Computer Programming
440 subscribers
6 files
231 links
We mainly post about Tech Interview Prep, Machine Learning, Full Stack, Data Structures, Algorithms & Programming Languages.

Please check the pinned message and invite your friends to this channel. Sharing is Caring 💕
Download Telegram
596. Classes More Than 5 Students

Problem Statement There is a table courses with columns: student and class Please list out all classes which have more than or equal to 5 students. For example, the table: +---------+------------+ | student | class | +---------+------------+ | A |…

https://thecodingbot.com/596-classes-more-than-5-students/
LeetCode – 1295. Find Numbers with Even Number of Digits

Problem Statement Given an array nums of integers, return how many of them contain an even number of digits. Example 1: Input: nums = [12,345,2,6,7896] Output: 2 Explanation: 12 contains 2 digits (even number of digits).  345 contains 3…

https://thecodingbot.com/leetcode-1295-find-numbers-with-even-number-of-digits/
Python’s built-in id() method with examples

In this tutorial, we will talk about a built-in method in Python, and that method is id(). We will talk about its syntax, where is it used, what parameters it takes and what value it returns.…

https://thecodingbot.com/pythons-built-in-id-with-examples/
LeetCode – 1108. Defanging an IP Address

Problem Statement Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: Input: address = "1.1.1.1" Output: "1[.]1[.]1[.]1" Example 2: Input: address = "255.100.50.0" Output: "255[.]100[.]50[.]0"…

https://thecodingbot.com/leetcode-1108-defanging-an-ip-address/
LeetCode – 1281. Subtract the Product and Sum of Digits of an Integer

Problem Statement Given an integer number n, return the difference between the product of its digits and the sum of its digits. Example 1: Input: n = 234 Output: 15 Explanation: Product of digits = 2…

https://thecodingbot.com/leetcode-1281-subtract-the-product-and-sum-of-digits-of-an-integer/
Forwarded from Computer Programming
Printing complete star triangle in C++

Problem Statement Given the number of rows, form a complete triangle made up of stars(asterisks) “*”. For Example Input: 5 Output: Complete star triangle pattern in C++ Solution This is an easy problem which can be solved simply using nested loops. Let’s try to understand this problem with an example. Consider the input number of rows…

https://thecodingbot.com/printing-complete-star-triangle-in-c/
LeetCode – 175. Combine Two Tables

Problem Statement Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId | int | | FirstName | varchar | | LastName | varchar | +-------------+---------+ PersonId is the primary key column for this…

https://thecodingbot.com/leetcode-175-combine-two-tables/
It is thursday and we learn about algorithms today. Today's topic is "How to implement a Linear Regression algorithm from Scratch in Python?"

Here are some top resources:

1. Machine Learning Mastery: https://machinelearningmastery.com/implement-simple-linear-regression-scratch-python/
2. Towards Data Science Blog:
Part 1: https://towardsdatascience.com/linear-regression-from-scratch-cd0dee067f72
Part 2: https://towardsdatascience.com/implementation-linear-regression-in-python-in-5-minutes-from-scratch-f111c8cc5c99

Source Code from github:
1. https://github.com/sarvasvkulpati/LinearRegression

——————————-

For complete beginners, read about Linear Regression here -

1.https://towardsdatascience.com/introduction-to-machine-learning-algorithms-linear-regression-14c4e325882a
2. Or here, https://machinelearningmastery.com/linear-regression-for-machine-learning/

Kaggle competition where you can use Linear Regression

1. https://www.kaggle.com/c/house-prices-advanced-regression-techniques
2. https://www.kaggle.com/c/rossmann-store-sales


Happy Machine Learning (thecodingbot.com, t.me/computerprogrammingcodingbot)
LeetCode – 1221. Split a String in Balanced Strings

Problem Statement Balanced strings are those who have equal quantity of ‘L’ and ‘R’ characters. Given a balanced string s split it in the maximum amount of balanced strings. Return the maximum amount of splitted balanced strings. Example…

https://thecodingbot.com/leetcode-1221-split-a-string-in-balanced-strings/
Computer Programming
http://www.computer-books.us/cpp_0010.php
An ebook to make you familar with C++ with QT framework
Convert column/header names to uppercase in a Pandas DataFrame

Overview The problem is very similar to – Capitalize the first letter in the column of a Pandas dataframe, you might want to check that as well. The first thing we should know is Dataframe.columns…

https://thecodingbot.com/convert-column-header-names-to-uppercase-in-a-pandas-dataframe/
Python’s len(set) method with examples

Overview Set in mathematics is a well-defined collection of distinct objects which are often called as elements or the members. There’s a dedicated data structure for sets in almost every advanced programming language, and python too is not…

https://thecodingbot.com/pythons-lenset-method-with-examples/