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
Forwarded from Computer Programming
LeetCode – 387. First Unique Character in a String

Problem Statement: Given a string, find the first non-repeating character in it and return its index. If it doesn’t exist, return -1. Examples: s = "leetcode" return 0. s = "loveleetcode", return 2. Note: You may assume the string contains only lowercase letters. Solution Probably the best approach to solve this problem is by traversing the string and using a…

https://thecodingbot.com/leetcode-387-first-unique-character-in-a-string/
How to run scripts from the python shell?

Running python script from the command line or terminal is pretty easy, you just have to type run python script_name.py and it is done. Take a look at the example below to see how it…

https://thecodingbot.com/how-to-run-scripts-from-the-python-shell/
Forwarded from Computer Programming
Different type of looping in Python

Overview In programming, a loop is a sequence of instructions that are continuously repeated until certain condition(s) is(are) met. The condition is often known as the terminating condition. In python, the Loops are broadly classified…

https://thecodingbot.com/different-type-of-looping-in-python/
Given (x,y) coordinates of n houses, where should you build a road parallel to the x-axis to minimize the construction cost of building driveways?

Figure Road-House driveway Although the question is pretty clear, it is still necessary to clarify a few things. The road actual costs nothing to build. All the costs that we are considering in the question…

https://thecodingbot.com/given-xy-coordinates-of-n-houses-where-should-you-build-a-road-parallel-to-the-x-axis-to-minimize-the-construction-cost-of-building-driveways/
Forwarded from Computer Programming
Print the elements of a singly linked list in reverse order

Problem Statement Given a singly linked list, print its elements in reverse order. For example: Input : 1->2->3->4->NULL Output: Printing the linked list in reverse order: 4 3 2 1 Solution First of all, readers should be clear that this problem is not the same as reversing the linked list. In this problem, we just need to…

https://thecodingbot.com/print-the-elements-of-a-singly-linked-list-in-reverse-order/
Count the number of nodes in a circular linked list

Problem Statement Given a circular linked list, you have to count the number of nodes in it. For example: A Circular linked list with a total of 6 nodes. Solution Well, there is only one…

https://thecodingbot.com/count-the-number-of-nodes-in-a-circular-linked-list/
I apologize for not being active for couple of days. Will be posting regularly from 3rd. Any ideas feedback write to: thecodingbot@gmail.com
Forwarded from Computer Programming
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/
The blog and this channel has not been active for some time now. I have been going through some rough patches in my personal life and not really sure when will I be able to continue posting. All the members are welcome to stay as I am not going to delete the channel or blog but can't assure you when will I be able to make a comeback. You guys were amazing audience.
Should start posting ?
Anonymous Poll
94%
Yes
6%
Yes
**SQL**
Question—> Write a SQL query to get the nth highest salary from the Employee table.
Problem statement link —> https://leetcode.com/problems/nth-highest-salary/
Detailed solution link —> https://thecodingbot.com/leetcode-177-nth-highest-salary/

Attempt the problem by yourself first :)
How to check the version of Pandas?

Table of Contents SolutionSolution 1 – GEt version number with __version__ attributeSolution 2 – Using pip Freeze + GrepSolution 3 – With PIP SHOW Solution There are several ways you check the version of pandas you are…

https://thecodingbot.com/how-to-check-the-version-of-pandas/
Any Feedback/Suggestions ? Drop a comment on the group above