Coding Interview Resources
50.3K 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
A microservice is a software development technique where an application is structured as a collection of small, loosely coupled services. Each service is designed to perform a specific function or task within the application and can be developed, deployed, and scaled independently. Microservices communicate with each other through well-defined APIs, allowing for flexibility, scalability, and resilience in the overall system. This approach enables teams to work on different services simultaneously, promotes faster development cycles, and makes it easier to update or replace individual services without affecting the entire application. Overall, microservices architecture is known for its agility, maintainability, and ability to adapt to changing business requirements.
๐Ÿ‘15
12 things an API Gateway can do for your application:

โœ… Single entry point for incoming requests.

โœ… Parameter Validation for the various attributes within the HTTP request

โœ… Whitelist checks to allow or deny requests based on pre-defined rules

โœ… Authentication and authorization by talking to an identity provider

โœ… Rate Limiting requests based on application-defined rules and reject requests if the limit is violated.

โœ… Route the requests to the relevant service based on path-matching.

โœ… Service Discovery by contacting the service registry and finding the appropriate service instances.

โœ… Request transformation from one protocol to another if needed. For example, REST to gRPC and vice-versa.

โœ… Handling errors for some basic issues

โœ… Circuit breakers for preventing cascading failures and providing fallback responses to the client

โœ… Caching common responses

โœ… Logging request data and error data for efficient monitoring.
๐Ÿ‘13
Software development is complex, and the fancy names don't help.

Hashing vs. Encryption vs. Encoding


๐—›๐—ฎ๐˜€๐—ต๐—ถ๐—ป๐—ด

This is a one-way process used for data integrity verification.

When you hash data, you get a unique string representing the original data.

It's a one-way street; once you hash something, you can't get the original data back from the hash.

While multiple values can theoretically yield the same hash, well-crafted cryptographic hash functions make such collisions incredibly rare and nearly impossible to compute.

This property makes it perfect for verifying if someone altered the data.

If even one-bit changes in the original data, the hash changes dramatically.


๐—˜๐—ป๐—ฐ๐—ฟ๐˜†๐—ฝ๐˜๐—ถ๐—ผ๐—ป

This is the real deal when it comes to data security.

It uses algorithms and keys to transform readable data (plaintext) into an unreadable format (ciphertext).

Only those with the correct key can unlock (decrypt) the data and read it.

This process is reversible, unlike hashing.

Encryption is critical for protecting sensitive data from unauthorized access.


๐—˜๐—ป๐—ฐ๐—ผ๐—ฑ๐—ถ๐—ป๐—ด

This is all about data representation.

It converts data from one format to another, making it easier to interpret and display.

Common formats:

โ€ข Base64
โ€ข UTF-8
โ€ข ASCII

Encoding does NOT provide security! It's for data transmission and storage convenience.


One common use of hashing is for secure password storage.

When you create an account or set a password, the system hashes and stores the password in the database.

During login, the system hashes the provided password and compares it to the stored hash without revealing the password.
๐Ÿ‘14โค1
The reason youโ€™re struggling with ๐—ฆ๐˜†๐˜€๐˜๐—ฒ๐—บ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป interviews isn't because you havenโ€™t studied countless case studies or designed multitude of systems.

It is because you haven't mastered the core concepts.

You can study all the complex systems, like distributed databases or scalable microservices architectures or designing a large-scale distributed system or a high-throughput messaging service. But these aren't as common as you might think.

Focus on strengthening your foundational knowledge first. No matter the language you prefer, whether Python, C++, Java, or JavaScript, start by building a solid understanding of core system design principles.

โžค System Design Key Concepts:

1. Scalability: https://lnkd.in/gpge_z76
2. Latency vs Throughput: https://lnkd.in/g_amhAtN
3. CAP Theorem: https://lnkd.in/g3hmVamx
4. ACID Transactions: https://lnkd.in/gMe2JqaF
5. Rate Limiting: https://lnkd.in/gWsTDR3m
6. API Design: https://lnkd.in/ghYzrr8q
7. Strong vs Eventual Consistency: https://lnkd.in/gJ-uXQXZ
8. Distributed Tracing: https://lnkd.in/d6r5RdXG
9. Synchronous vs. asynchronous communications: https://lnkd.in/gC3F2nvr
10. Batch Processing vs Stream Processing: https://lnkd.in/g4_MzM4s
11. Fault Tolerance: https://lnkd.in/dVJ6n3wA

โžค System Design Building Blocks:

1. Databases: https://lnkd.in/gti8gjpz
2. Horizontal vs Vertical Scaling: https://lnkd.in/gAH2e9du
3. Caching: https://lnkd.in/gC9piQbJ
4. Distributed Caching: https://lnkd.in/g7WKydNg
5. Load Balancing: https://lnkd.in/gQaa8sXK
6. SQL vs NoSQL: https://lnkd.in/g3WC_yxn
7. Database Scaling: https://lnkd.in/gAXpSyWQ
8. Data Replication: https://lnkd.in/gVAJxTpS
9. Data Redundancy: https://lnkd.in/gNN7TF7n
10. Database Sharding: https://lnkd.in/gMqqc6x9
11. Database Index's: https://lnkd.in/gCeshYVt
12. Proxy Server: https://lnkd.in/gi8KnKS6
13. WebSocket: https://lnkd.in/g76Gv2KQ
14. API Gateway: https://lnkd.in/gnsJGJaM
15. Message Queues: https://lnkd.in/gTzY6uk8

โžค System Design Architectural Patterns:

1. Event-Driven Architecture: https://lnkd.in/dp8CPvey
2. Client-Server Architecture: https://lnkd.in/dAARQYzq
3. Serverless Architecture: https://lnkd.in/gQNAXKkb
4. Microservices Architecture: https://lnkd.in/gFXUrz_T

โžค Machine Coding Round and Low Level Design Problems:

1. Design a Parking Lot: https://lnkd.in/dQaAuFd2
2. Design Splitwise: https://lnkd.in/dF5fBnex
3. Design Chess Validator: https://lnkd.in/dfAQHvN4
4. Design a Distributed Queue | Kafka: https://lnkd.in/dQ6_B4_M
5. Design Tic-Tac-Toe: https://lnkd.in/dFDApUBt

Python Interview Questions and Answers

https://t.me/dsabooks/75

Beginner's guide for DSA

https://www.geeksforgeeks.org/the-ultimate-beginners-guide-for-dsa/amp/

Cracking the coding interview FREE BOOK

https://www.pdfdrive.com/cracking-the-coding-interview-189-programming-questions-and-solutions-d175292720.html

DSA Interview Questions and Answers

https://t.me/crackingthecodinginterview/77

Data Science Interview Questions and Answers

https://t.me/datasciencefun/958

Java Interview Questions with Answers

https://t.me/Curiousprogrammer/106

โžค System Design and Architecture (HLD):

1. Design a Unique ID Generator Service
2. Design a URL Shortening Service
3. Design Whatsapp
4. Design Instagram/Twitter News Feed
5. Design Search Autocomplete | Design Typeahead
6. Design Zomato Restaurant Search | Design Proximity Service

Best DSA RESOURCES: https://topmate.io/coding/886874

All the best ๐Ÿ‘๐Ÿ‘
๐Ÿ‘18โค6๐Ÿฅฐ1
You MUST Learn CI/CD with Github Actions. ๐Ÿ˜Ž

GitHub Actions workflow is a typical setup for automating the process of building, testing, and deploying code, ensuring that only code that passes all tests gets deployed to production. ๐Ÿ’ก

1. Workflow :
โœ… The title at the top (name: CI/CD with GitHub Actions) indicates the name of the workflow. This name helps to identify the workflow among others in the repository.

2. Trigger (on):
โœ… The on keyword specifies the event that triggers this workflow. In this case, the workflow is triggered by a push event to the main branch. This means that whenever a commit is pushed to the main branch, the workflow will run automatically.

3. Jobs:
โœ… The jobs section defines the tasks that will be executed in this workflow. There are two jobs defined here: build and deploy.

3.1 Build Job: โœ…
- runs-on: specifies the virtual environment where the job will run. Here, ubuntu-latest means it will run on the latest version of Ubuntu provided by GitHub Actions.

- โœ…Steps:
1. Checkout Repository: Uses the actions/checkout@v2 action to clone the repository's code into the workflow environment.
2. Set up Node.js: Uses the actions/setup-node@v3 action to install Node.js version 14, preparing the environment to run Node.js commands.
3. Install Dependencies: Runs npm install to install the project's dependencies defined in package.json.
4. Run Tests: Executes npm test to run the project's tests.

3.2 Deploy Job: โœ…
- needs: specifies that the deploy job depends on the success of the build job. It will only run if the build job completes successfully.
- runs-on: Like the build job, the deploy job also runs on ubuntu-latest.

- Steps: โœ…
1. Deploy to Production:
The run block contains a simple shell script that checks if the build job was successful. If it was, it echoes "Deployment logic goes here" (which is where you would put the actual deployment commands). If the build failed, it outputs "Build failed, skipping deployment".
๐Ÿ‘10
Unpopular opinion: FAANG job interviews are harder than the actual job.
๐Ÿ‘9โค2
I have created the list of top 100 product based companies to target in 2024. You can access it for free now
๐Ÿ‘‡๐Ÿ‘‡
https://topmate.io/coding/1076270

Please give your ratings if you like the product

ENJOY LEARNING ๐Ÿ‘๐Ÿ‘
๐Ÿ‘9โค2๐Ÿฅฐ2
API design involves making decisions about how your API will interact with consumers.

The major API design choices are:

REST (Representational State Transfer): It uses HTTP methods (GET, POST, PUT, DELETE) for CRUD operations on resources. It's stateless and commonly used for web-based APIs

GraphQL: Query language for APIs, it allows clients to request specific data

RPC (Remote Procedure Call): High-performance, language-agnostic framework, often used in microservices architectures
๐Ÿ‘9โค1
โค12๐Ÿ‘2
A doubly linked list has two pointers โ€˜leftโ€™ and โ€˜rightโ€™ which enable it to traverse in either direction. Compared to singly liked list which has only a โ€˜nextโ€™ pointer, doubly linked list requires extra space to store this extra pointer. Every insertion and deletion requires manipulation of two pointers, hence it takes a bit longer time. Implementing doubly linked list involves setting both left and right pointers to correct nodes and takes more time than singly linked list.
๐Ÿ‘7
https://topmate.io/coding/886874

If you're a job seeker, these well structured document DSA resources will help you to know and learn all the real time DSA & OOPS Interview questions with their exact answer. folks who are having 0-4+ years of experience have cracked the interview using this guide!

Please use the above link to avail them!๐Ÿ‘†

NOTE: -Most people hoard resources without actually opening them even once! The reason for keeping a small price for these resources is to ensure that you value the content available inside this and encourage you to make the best out of it.

Hope this helps in your job search journey... All the best!๐Ÿ‘โœŒ๏ธ
๐Ÿ‘8โค2
Programming is no longer about how well you google search.

Programming is now about how well you can write prompts for an ai system to generate code for you
๐Ÿ‘Œ21๐Ÿ‘6โค3๐Ÿ‘1
DSA INTERVIEW QUESTIONS AND ANSWERS

1. What is the difference between file structure and storage structure?
The difference lies in the memory area accessed. Storage structure refers to the data structure in the memory of the computer system,
whereas file structure represents the storage structure in the auxiliary memory.

2. Are linked lists considered linear or non-linear Data Structures?
Linked lists are considered both linear and non-linear data structures depending upon the application they are used for. When used for
access strategies, it is considered as a linear data-structure. When used for data storage, it is considered a non-linear data structure.

3. How do you reference all of the elements in a one-dimension array?
All of the elements in a one-dimension array can be referenced using an indexed loop as the array subscript so that the counter runs
from 0 to the array size minus one.

4. What are dynamic Data Structures? Name a few.
They are collections of data in memory that expand and contract to grow or shrink in size as a program runs. This enables the programmer
to control exactly how much memory is to be utilized.Examples are the dynamic array, linked list, stack, queue, and heap.

5. What is a Dequeue?
It is a double-ended queue, or a data structure, where the elements can be inserted or deleted at both ends (FRONT and REAR).

6. What operations can be performed on queues?
enqueue() adds an element to the end of the queue
dequeue() removes an element from the front of the queue
init() is used for initializing the queue
isEmpty tests for whether or not the queue is empty
The front is used to get the value of the first data item but does not remove it
The rear is used to get the last item from a queue.

7. What is the merge sort? How does it work?
Merge sort is a divide-and-conquer algorithm for sorting the data. It works by merging and sorting adjacent data to create bigger sorted
lists, which are then merged recursively to form even bigger sorted lists until you have one single sorted list.

8.How does the Selection sort work?
Selection sort works by repeatedly picking the smallest number in ascending order from the list and placing it at the beginning. This process is repeated moving toward the end of the list or sorted subarray.

Scan all items and find the smallest. Switch over the position as the first item. Repeat the selection sort on the remaining N-1 items. We always iterate forward (i from 0 to N-1) and swap with the smallest element (always i).

Time complexity: best case O(n2); worst O(n2)

Space complexity: worst O(1)

9. What are the applications of graph Data Structure?
Transport grids where stations are represented as vertices and routes as the edges of the graph
Utility graphs of power or water, where vertices are connection points and edge the wires or pipes connecting them
Social network graphs to determine the flow of information and hotspots (edges and vertices)
Neural networks where vertices represent neurons and edge the synapses between them

10. What is an AVL tree?
An AVL (Adelson, Velskii, and Landi) tree is a height balancing binary search tree in which the difference of heights of the left
and right subtrees of any node is less than or equal to one. This controls the height of the binary search tree by not letting
it get skewed. This is used when working with a large data set, with continual pruning through insertion and deletion of data.

11. Differentiate NULL and VOID ?
Null is a value, whereas Void is a data type identifier
Null indicates an empty value for a variable, whereas void indicates pointers that have no initial size
Null means it never existed; Void means it existed but is not in effect

You can check these resources for Coding interview Preparation

Credits: https://t.me/free4unow_backup

All the best ๐Ÿ‘๐Ÿ‘
๐Ÿ‘10
How to guess the solution for DSA problems?

Yes, it is possible.

You can predict the solution for a problem by analyzing the constraints.

Curious if you need a greedy approach or a backtracking solution? Trying to decide between an O(n^3) or an O(n log n) approach? Just scroll down the LeetCode question and look at the constraints of the main element.

Wondering if you should use dynamic programming or plain recursion? Should your solution be O(n^2) or O(n)? Simply examine the constraints of the main variable.

Here's a quick guide based on the value of (n):

- If n <= 12 Time complexity can be O(n!).
- If n <= 25 Time complexity can be O(2^n).
- If n <= 100 Time complexity can be O(n^4).
- If n <= 500 Time complexity can be O(n^3).
- If n <= 10 ^ 4 Time complexity can be O(n^2).
- If n <= 10 ^ 6 Time complexity can be O(n log n).
- If n <= 10 ^ 8 Time complexity can be O(n).
- If n > 10 ^ 8 Time complexity can be O(log n) or 0(1).
- If n <= 10 ^ 9 Time complexity can be O(sqrt{n}).
- If n > 10 ^ 9 Time complexity can be O(log n) or 0(1).

Understanding these constraints can help you choose the right algorithm and improve your problem-solving efficiency.

Best DSA RESOURCES: https://topmate.io/coding/886874

All the best ๐Ÿ‘๐Ÿ‘
๐Ÿ‘9
Top 9 Http Methods-

GET ๐Ÿง - Retrieve data from a resource.
HEAD ๐ŸŽง - Retrieve the headers of a resource.
POST ๐Ÿ“ฎ - Submit data to a resource.
PUT ๐Ÿ“ฅ - Update an existing resource or create a new resource.
DELETE ๐Ÿ—‘๏ธ - Remove a resource.
CONNECT ๐Ÿ”— - Establish a network connection for a resource.
OPTIONS โš™๏ธ - Describe communication options for the target resource.
TRACE ๐Ÿ•ต๏ธโ€โ™‚๏ธ - Retrieve a diagnostic trace of the request.
PATCH ๐Ÿฉน - Apply a partial update to a resource.
โค6๐Ÿ‘5
Many people reached out to me saying telegram may get banned in their countries. So I've decided to create WhatsApp channels based on your interests ๐Ÿ‘‡๐Ÿ‘‡

Free Courses with Certificate: https://whatsapp.com/channel/0029Vamhzk5JENy1Zg9KmO2g

Jobs & Internship Opportunities:
https://whatsapp.com/channel/0029VaI5CV93AzNUiZ5Tt226

Web Development: https://whatsapp.com/channel/0029VaiSdWu4NVis9yNEE72z

Python Free Books & Projects: https://whatsapp.com/channel/0029VaiM08SDuMRaGKd9Wv0L

Java Resources: https://whatsapp.com/channel/0029VamdH5mHAdNMHMSBwg1s

Coding Interviews: https://whatsapp.com/channel/0029VammZijATRSlLxywEC3X

SQL: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v

Power BI: https://whatsapp.com/channel/0029Vai1xKf1dAvuk6s1v22c

Programming Free Resources: https://whatsapp.com/channel/0029VahiFZQ4o7qN54LTzB17

Data Science Projects: https://whatsapp.com/channel/0029Va4QUHa6rsQjhITHK82y

Learn Data Science & Machine Learning: https://whatsapp.com/channel/0029Va8v3eo1NCrQfGMseL2D

Donโ€™t worry Guys your contact number will stay hidden!

ENJOY LEARNING ๐Ÿ‘๐Ÿ‘
๐Ÿ‘7โค2๐Ÿ‘1
Problem: Given an array a of n integers, find all such elements a[i], a[j], a[k], and a[l], such that a[i] + a[j] + a[k] + a[l] = target? Output all unique quadruples.

Solution: of course one way would be to just use 4 nested loops to iterate over all possible quadruples, but this is quite slow O(n^4). Another way is to iterate over all triples, put the sums into a set and then in another pass over elements a[i] check if we have any triple with sum (T - a[i]). This would give us O(n^3), and we need to keep track of which elements gave us the required sums. Another step is to iterate over all pairs and put results into a map from integer to indexes of elements, which produce this sum. Then in another pass over this map we can see if we can get a sum of T using two different values from the map (and they shouldn't be using the same element twice). This approach has time complexity O(n^2).
๐Ÿ‘6โค3
Solve these 16 problem solving patterns to learn enough DSA

1. Sliding window pattern.
2. Two pointer pattern.
3. Fast & slow pointers pattern.
4. Merger interval pattern.
5. Cyclic sort pattern.
6. In-place reversal of linked list pattern.
7. Tree breadth first search pattern.
8. Depth first search DFS pattern.
9. Two heap pattern.
10. Subsets pattern.
11. Modified binary search pattern.
12. Bitwise xor pattern.
13. Top 'K' elements pattern.
14. K-way merge pattern.
15. 0/1 knapsack DP pattern.
16. Topological sort Graph pattern.
โค19๐Ÿ‘9
๐—ฆ๐˜๐—ฒ๐—ฝ๐˜€ ๐—ง๐—ผ ๐—ฃ๐—ฟ๐—ฒ๐—ฝ๐—ฎ๐—ฟ๐—ฒ ๐—™๐—ผ๐—ฟ ๐—ฎ ๐—ง๐—ฒ๐—ฐ๐—ต๐—ป๐—ถ๐—ฐ๐—ฎ๐—น ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„

๐Ÿ‘‰ ๐—ž๐—ป๐—ผ๐˜„ ๐˜๐—ต๐—ฒ ๐—๐—ผ๐—ฏ: Review the job description.
๐Ÿ‘‰ ๐—•๐—ฎ๐˜€๐—ถ๐—ฐ๐˜€: Revise fundamental concepts.
๐Ÿ‘‰ ๐—–๐—ผ๐—ฑ๐—ฒ ๐—ฃ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฒ: Solve coding problems.
๐Ÿ‘‰ ๐—ฃ๐—ฟ๐—ผ๐—ท๐—ฒ๐—ฐ๐˜๐˜€: Be ready to discuss past work.
๐Ÿ‘‰ ๐— ๐—ผ๐—ฐ๐—ธ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„๐˜€: Practice with friends or online.
๐Ÿ‘‰ ๐—ฆ๐˜†๐˜€๐˜๐—ฒ๐—บ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป: Review basics if needed.
๐Ÿ‘‰ ๐—ค๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป๐˜€: Prepare some for the interviewer.
๐Ÿ‘‰ ๐—ฅ๐—ฒ๐˜€๐˜: Sleep well and stay calm.

Remember, practice and confidence are the key! Good luck with your technical interview! ๐ŸŒŸ๐Ÿ‘

You can check these resources for Coding interview Preparation

All the best ๐Ÿ‘๐Ÿ‘
๐Ÿ‘11โค2๐Ÿ‘Œ1
Beginnerโ€™s Roadmap to Learn Data Structures & Algorithms

1. Foundations: Start with the basics of programming and mathematical concepts to build a strong foundation.

2. Data Structure: Dive into essential data structures like arrays, linked lists, stacks, and queues to organise and store data efficiently.

3. Searching & Sorting: Learn various search and sort techniques to optimise data retrieval and organisation.

4. Trees & Graphs: Understand the concepts of binary trees and graph representation to tackle complex hierarchical data.

5. Recursion: Grasp the principles of recursion and how to implement recursive algorithms for problem-solving.

6. Advanced Data Structures: Explore advanced structures like hashing, heaps, and hash maps to enhance data manipulation.

7. Algorithms: Master algorithms such as greedy, divide and conquer, and dynamic programming to solve intricate problems.

8. Advanced Topics: Delve into backtracking, string algorithms, and bit manipulation for a deeper understanding.

9. Problem Solving: Practice on coding platforms like LeetCode to sharpen your skills and solve real-world algorithmic challenges.

10. Projects & Portfolio: Build real-world projects and showcase your skills on GitHub to create an impressive portfolio.

Best DSA RESOURCES: https://topmate.io/coding/886874

All the best ๐Ÿ‘๐Ÿ‘
๐Ÿ‘7