Coding Interview Resources
50.4K subscribers
693 photos
7 files
398 links
This channel contains the free resources and solution of coding problems which are usually asked in the interviews.

Managed by: @love_data
Download Telegram
๐Ÿ˜‚
โค5๐Ÿ‘1
Best Resources for Tech Interviews
๐Ÿ‘2
Data Structures and Algorithms in Real Life examples

Array :
2D arrays (matrices) are mainly used in Image Processing.
RGB image uses a 3D matrix.
2D arrays are also used in Game Design like Sudoku, Chess.
The Leader Board of game or coding contest.

Stack :
Used in backtracking, check valid parenthesis in an expression.
Evaluating Infix and Postfix expressions.
Used in Recursive function calls to store function calls and their results.
Undo and Redo operations in word processors like MS-Word, and Notepad.
Browsing history of visited websites.
Call history/log in mobile phones.
Java Virtual Machine uses a stack to store immediate calculation results.

Queue:
Windows operating system uses a circular queue to switch between different applications.
Used in First Come First Serve job/CPU scheduling algorithm which follows FIFO order.
All the requests are queued for the server to respond.

Priority Queue :
A priority queue is used in priority scheduling algorithm and interrupt handling in OS.
Used in Huffman Coding in compression algorithms.

Linked List:
Previous and Next Page in Web Browser.
Songs in the music player are linked to the previous and next songs using doubly linked list.
Next and previous images in a phone gallery.
Multiple Applications running on a PC uses circular linked list.
Used for the implementation of stacks, queues, trees, and graphs.

Graph :
In Facebook, LinkedIn and other social networking sites, users are considered to be the vertices and the edge between them indicates that they are connected.
Facebookโ€™s Graph API and Googleโ€™s Knowledge API are the best examples of grpah.
Google Maps, Yahoo Maps, Apple Maps uses graph to show the shortest path using Breadth First Search (BFS).
Used in HTML DOM and React Virtual DOM.

Tree :
Representation structure in File Explorer. (Folders and Subfolders) uses N-ary Tree.
Auto-suggestions when you google something using Trie.
Used in decision-based machine learning algorithms.
Used in Backtracking to maintain the state-space tree.
A binary tree is used in database indexing to store and retrieve data in an efficient manner.
To implement Heap data structure.

Binary Search Trees: (BST) can be used in sorting algorithms.

Dijkstra Algorithm :
This algorithm is used to find the shortest path between two vertices in a graph in such a way that the sum of weights between the edges is minimum.

Prims Algorithm :
It is a greedy algorithm to obtain a minimum spanning tree.
๐Ÿ‘6โค1
Easy Python scenarios for everyday data tasks



Scenario 1: Data Cleaning
Question:
You have a DataFrame containing product prices with columns Product and Price. Some of the prices are stored as strings with a dollar sign, like $10. Write a Python function to convert the prices to float.

Answer:
import pandas as pd
data = {
'Product': ['A', 'B', 'C', 'D'],
'Price': ['$10', '$20', '$30', '$40']
}
df = pd.DataFrame(data)

def clean_prices(df):
df['Price'] = df['Price'].str.replace('$', '').astype(float)
return df
cleaned_df = clean_prices(df)
print(cleaned_df)

Scenario 2: Basic Aggregation
Question:
You have a DataFrame containing sales data with columns Region and Sales. Write a Python function to calculate the total sales for each region.

Answer:
import pandas as pd
data = {
'Region': ['North', 'South', 'East', 'West', 'North', 'South', 'East', 'West'],
'Sales': [100, 200, 150, 250, 300, 100, 200, 150]
}
df = pd.DataFrame(data)

def total_sales_per_region(df):
total_sales = df.groupby('Region')['Sales'].sum().reset_index()
return total_sales

total_sales = total_sales_per_region(df)
print(total_sales)

Scenario 3: Filtering Data
Question:
You have a DataFrame containing customer data with columns โ€˜CustomerIDโ€™, Name, and Age. Write a Python function to filter out customers who are younger than 18 years old.

Answer:
import pandas as pd
data = {
'CustomerID': [1, 2, 3, 4, 5],
'Name': ['Alice', 'Bob', 'Charlie', 'David', 'Eve'],
'Age': [17, 22, 15, 35, 40]
}
df = pd.DataFrame(data)

def filter_customers(df):
filtered_df = df[df['Age'] >= 18]
return filtered_df
filtered_customers = filter_customers(df)
print(filtered_customers)
๐Ÿ‘1
Software Engineer: C++ C# Java, Python, JavaScript

Web Dev: HTML, CSS, JavaScript, NodeJS

Game Dev: Unity, Unreal, Java

App Dev: Flutter, Objective C, Java, Swift, Kotlin, React

Cyber Security: Python, Linux, Networking

AI & Data Science - Julia, Haskell
๐Ÿ‘3๐Ÿ‘2
Essential Tools & Programming Languages for Software Developers

๐Ÿ‘‰ Integrated Development Environments (IDEs):
- Visual Studio Code: A lightweight but powerful source code editor that supports various programming languages and extensions.
- IntelliJ IDEA: A popular IDE for Java development, also supporting other languages through plugins.
- Eclipse: Another widely used IDE for Java, with extensive plugin support for other languages.

๐Ÿ‘‰ Version Control Systems:
- Git: A distributed version control system that allows developers to track changes in their codebase, collaborate with others, and manage project history. GitHub, GitLab, and Bitbucket are popular platforms that use Git.

๐Ÿ‘‰ Programming Languages:
- JavaScript: Essential for web development, with frameworks like React, Angular, and Vue.js for front-end development and Node.js for server-side programming.
- Python: Known for its simplicity and versatility, used in web development (Django, Flask), data science (NumPy, Pandas), and automation.
- Java: Widely used for building enterprise-scale applications, Android app development, and backend systems.
- C#: A language developed by Microsoft, primarily used for building Windows applications and games using the Unity engine.
- C++: Known for its performance, used in system/software development, game development, and applications requiring real-time processing.
- Ruby: Known for its simplicity and productivity, often used in web development with the Ruby on Rails framework.

๐Ÿ‘‰ Web Development Frameworks:
- React: A JavaScript library for building user interfaces, particularly single-page applications.
- Angular: A TypeScript-based framework for building dynamic web applications.
- Django: A high-level Python web framework that encourages rapid development and clean, pragmatic design.
- Spring: A comprehensive framework for Java that provides infrastructure support for developing Java applications.

๐Ÿ‘‰ Database Management Systems:
- MySQL: An open-source relational database management system.
- PostgreSQL: An open-source object-relational database system with a strong emphasis on extensibility and standards compliance.
- MongoDB: A NoSQL database that uses a flexible, JSON-like format for storing data.

๐Ÿ‘‰ Containerization and Orchestration:
- Docker: A platform that allows developers to package applications into containers, ensuring consistency across multiple environments.
- Kubernetes: An open-source system for automating deployment, scaling, and management of containerized applications.

๐Ÿ‘‰ Cloud Platforms:
- Amazon Web Services (AWS): A comprehensive cloud platform offering a wide range of services, including computing power, storage, and databases.
- Microsoft Azure: A cloud computing service created by Microsoft for building, testing, deploying, and managing applications.
- Google Cloud Platform (GCP): A suite of cloud computing services provided by Google.

๐Ÿ‘‰ CI/CD Tools:
- Jenkins: An open-source automation server that helps automate the parts of software development related to building, testing, and deploying.
- Travis CI: A continuous integration service used to build and test software projects hosted on GitHub.

๐Ÿ‘‰ Project Management and Collaboration:
- Jira: A tool developed by Atlassian for bug tracking, issue tracking, and project management.
- Trello: A visual tool for organizing tasks and projects into boards.

Programming & Data Analytics Resources: https://t.me/free4unow_backup/796

Best Programming Resources: https://topmate.io/coding/886839

Join @free4unow_backup for more free courses

Like for more โค๏ธ

ENJOY LEARNING๐Ÿ‘๐Ÿ‘
๐Ÿ‘8
ยฉHow fresher can get a job as a data scientist?ยฉ

Job market is highly resistant to hire data scientist as a fresher. Everyone out there asks for at least 2 years of experience, but then the question is where will we get the two years experience from?

The important thing here to build a portfolio. As you are a fresher I would assume you had learnt data science through online courses. They only teach you the basics, the analytical skills required to clean the data and apply machine learning algorithms to them comes only from practice.

Do some real-world data science projects, participate in Kaggle competition. kaggle provides data sets for practice as well. Whatever projects you do, create a GitHub repository for it. Place all your projects there so when a recruiter is looking at your profile they know you have hands-on practice and do know the basics. This will take you a long way.

All the major data science jobs for freshers will only be available through off-campus interviews.

Some companies that hires data scientists are:
Siemens
Accenture
IBM
Cerner

Creating a technical portfolio will showcase the knowledge you have already gained and that is essential while you got out there as a fresher and try to find a data scientist job.
๐Ÿ‘3
โœ…Meta interview questions : Most asked in last 30 days

1. 1249. Minimum Remove to Make Valid Parentheses

2. 408. Valid Word Abbreviation

3. 215. Kth Largest Element in an Array

4. 314. Binary Tree Vertical Order Traversal

5. 88. Merge Sorted Array

6. 339. Nested List Weight Sum

7. 680. Valid Palindrome II

8. 973. K Closest Points to Origin

9. 1650. Lowest Common Ancestor of a Binary Tree III

10. 1. Two Sum

11. 791. Custom Sort String

12. 56. Merge Intervals

13. 528. Random Pick with Weight

14. 1570. Dot Product of Two Sparse Vectors

15. 50. Pow(x, n)

16. 65. Valid Number

17. 227. Basic Calculator II

18. 560. Subarray Sum Equals K

19. 71. Simplify Path

20. 200. Number of Islands

21. 236. Lowest Common Ancestor of a Binary Tree

22. 347. Top K Frequent Elements

23. 498. Diagonal Traverse

24. 543. Diameter of Binary Tree

25. 1768. Merge Strings Alternately

26. 2. Add Two Numbers

27. 4. Median of Two Sorted Arrays

28. 7. Reverse Integer

29. 31. Next Permutation

30. 34. Find First and Last Position of Element in Sorted Array

31. 84. Largest Rectangle in Histogram

32. 146. LRU Cache

33. 162. Find Peak Element

34. 199. Binary Tree Right Side View

35. 938. Range Sum of BST

36. 17. Letter Combinations of a Phone Number
37. 125. Valid Palindrome

38. 153. Find Minimum in Rotated Sorted Array

39. 283. Move Zeroes

40. 523. Continuous Subarray Sum

41. 658. Find K Closest Elements

42. 670. Maximum Swap

43. 827. Making A Large Island

44. 987. Vertical Order Traversal of a Binary Tree

45. 1757. Recyclable and Low Fat Products

46. 1762. Buildings With an Ocean View

47. 2667. Create Hello World Function

48. 5. Longest Palindromic Substring

49. 15. 3Sum

50. 19. Remove Nth Node From End of List

51. 70. Climbing Stairs

52. 80. Remove Duplicates from Sorted Array II

53. 113. Path Sum II

54. 121. Best Time to Buy and Sell Stock

55. 127. Word Ladder

56. 128. Longest Consecutive Sequence

57. 133. Clone Graph

58. 138. Copy List with Random Pointer

59. 140. Word Break II

60. 142. Linked List Cycle II

61. 145. Binary Tree Postorder Traversal

62. 173. Binary Search Tree Iterator

63. 206. Reverse Linked List

64. 207. Course Schedule

65. 394. Decode String

66. 415. Add Strings

67. 437. Path Sum III

68. 468. Validate IP Address

70. 691. Stickers to Spell Word

71. 725. Split Linked List in Parts

72. 766. Toeplitz Matrix

73. 708. Insert into a Sorted Circular Linked List

74. 1091. Shortest Path in Binary Matrix

75. 1514. Path with Maximum Probability

76. 1609. Even Odd Tree

77. 1868. Product of Two Run-Length Encoded Arrays

78. 2022. Convert 1D Array Into 2D Array

DSA Interview Preparation Resources: https://topmate.io/coding/886874

ENJOY LEARNING ๐Ÿ‘๐Ÿ‘
โค1
Data structures in Python - cheat sheet
๐Ÿ‘2
๐ŸŒŸ Why Java Feels Harder Than C++ Sometimes ๐ŸŒŸ

1. Java: Why write one line when you can write 5? Every variable needs its type, every method needs a class.
C++: Write code anywhere. Procedural, OOP, or just chaos. Your call. ๐Ÿš€


2. Java: Even the simplest main needs a whole public class. ๐Ÿคก
C++: Need a main()? Just write it. Done.


3. Java: Checked exceptionsโ€”catch me or I'll scream. ๐ŸŽญ
C++: Exceptions? Handle them... or donโ€™t. No hard feelings, bro.


4. Java: No unsigned integers. Imagine life without them. Big sad. ๐Ÿ˜”
C++: Choose your poisonโ€”int, unsigned, long long. So many options to confuse you.


5. Java: Print something? Get ready: System.out.println(). Keyboard workout. โŒจ๏ธ๐Ÿ’ช
C++: cout <<. Done faster than you can say โ€œhello world.โ€


6. Java: Multi-threading? Write a novel and pray the JVM approves. ๐Ÿ“š
C++: Threading? Use libraries. Use APIs. DIY is the way.


7. Java: Genericsโ€”looks simple but screams at you later. ๐Ÿคฏ
C++: Templates are like magic. Dark magicโ€”youโ€™ll debug forever, though.


8. Java: Misspell a package name? Good luck. ๐Ÿ“ฆ
C++: Namespaces confuse, but fewer typos.


9. Java: The JVM controls your code and life. ๐Ÿ‘๏ธ
C++: Compile once, run anywhereโ€”until undefined behavior strikes. ๐ŸŒ€


10. Java: No operators in the name.
C++: The name is an operator. That's how cool it is. ๐Ÿ˜Ž
๐Ÿ‘10
8 Best Note-Taking Apps for Programmers

๐Ÿ“œ Notion
๐Ÿ“œ CoderNotes
๐Ÿ“œ Quiver
๐Ÿ“œ MedleyText
๐Ÿ“œ Boostnote
๐Ÿ“œ Stackedit
๐Ÿ“œ Evernote
๐Ÿ“œ Microsoft onenote
๐Ÿ‘6
Ages of Operating Systems๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป๐Ÿ˜Ž

๐Ÿ“‚ Windows 11 (3 years old)
๐ŸชŸ Windows 10 (8 years old)
๐ŸŽ macOS Yosemite (10 years old)
๐Ÿ‰ Kali Linux (11 years old)
๐Ÿ’ป Windows 8 (12 years old)
๐ŸŒ Manjaro (11 years old)
๐Ÿ’ป Windows 7 (14 years old)
๐Ÿ–ฅ๏ธ Windows Vista (17 years old)
๐ŸŒฟ Linux Mint (18 years old)
๐Ÿง Ubuntu (20 years old)
โš™๏ธ Fedora (20 years old)
๐Ÿ”ง OpenSUSE (20 years old)
โš™๏ธ CentOS (20 years old)
๐Ÿง Arch Linux (22 years old)
๐Ÿ macOS (22 years old)
๐Ÿ’ป Windows XP (23 years old)
๐Ÿ–ฅ๏ธ Windows 2000 (24 years old)
๐Ÿ“ฑ Windows 98 (25 years old)
๐ŸŒ Windows 95 (28 years old)
๐Ÿ’ป Windows 3.1 (29 years old)
๐Ÿ–ฅ๏ธ OS/2 (32 years old)
๐Ÿง Debian (31 years old)
๐Ÿ”ด Red Hat Linux (30 years old)
๐ŸŽฎ AmigaOS (34 years old)
๐Ÿ–ฅ๏ธ Xenix (40 years old)
๐Ÿ“€ VMS (44 years old)
๐Ÿ’พ MS-DOS (42 years old)
๐Ÿ’พ CP/M (49 years old)
๐Ÿ–ฅ๏ธ Unix (54 years old)
๐Ÿ‘10โค2๐Ÿ‘Œ1
Top 20 DSA questions asked in Data Engineering interviews at MAANG


1. Given an array of integers and a target value, find two numbers in the array that sum up to the target. Return the indices of the two numbers.
2. How do you reverse a singly linked list?
3. How do you find the missing number in an array of size N with numbers from 1 to N+1?
4. What is the approach to detect a cycle in a linked list?
5. How would you merge two sorted arrays?
6. How do you find the Kth largest element in an unsorted array?
7. Whatโ€™s the approach to finding the longest substring without repeating characters?
8. How do you find the middle element of a linked list?
9. Explain level order traversal in a binary tree.
10. How do you find the Lowest Common Ancestor (LCA) of two nodes in a binary tree?
11. How do you find the maximum sum subarray (using Kadane's Algorithm)?
12. Whatโ€™s the approach for finding the longest common subsequence between two strings?
13. How would you merge two sorted linked lists?
14. How do you check if parentheses in an expression are valid?
15. What is the binary search algorithm and how do you implement it?
16. How would you find the duplicate number in an array containing numbers from 1 to N?
17. What is the approach to reversing a string?
18. How do you find the product of all elements in an array except the current element?
19. How would you group anagrams from a list of strings?
20. How would you solve a Sudoku puzzle using backtracking?

DSA Interview Preparation Resources: https://topmate.io/coding/886874

ENJOY LEARNING ๐Ÿ‘๐Ÿ‘
โค2
Python vs C++ vs Java
๐Ÿ‘3๐Ÿ‘Œ1
What is Python?

- Python is a programming language ๐Ÿ

- It's known for being easy to learn and read ๐Ÿ“–

- You can use it for web development, data analysis, artificial intelligence, and more ๐Ÿ’ป๐ŸŒ๐Ÿ“Š

- Python is like writing instructions for a computer in a clear and simple way ๐Ÿ“๐Ÿ’ก

- Python supports working with a lot of data, making it great for projects that involve big data and statistics ๐Ÿ“ˆ๐Ÿ”

- It has a huge community, which means lots of support and resources for learners ๐ŸŒ๐Ÿค

- Python is versatile; it's used in scientific fields, finance, and even in making movies and video games ๐Ÿงช๐Ÿ’ฐ๐ŸŽฌ๐ŸŽฎ

- It can run on different platforms like Windows, macOS, Linux, and even Raspberry Pi ๐Ÿ–ฅ๏ธ๐Ÿ๐Ÿง๐Ÿ“

- Python has many libraries and frameworks that help speed up the development process for web applications, machine learning, and more ๐Ÿ› ๏ธ๐Ÿš€