0% found this document useful (0 votes)
343 views30 pages

Problem Solving Roadmap

Ofcourse highly impartial problem solving guide

Uploaded by

gsumi8024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
343 views30 pages

Problem Solving Roadmap

Ofcourse highly impartial problem solving guide

Uploaded by

gsumi8024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Mastering Problem Solving

A Comprehensive
Roadmap to C++ & DSA
The Secret Weapon for Landing
Your Dream Tech Job

www.gurucodes.dev
____________________

Table of Contents

Introduction
About me

What is Programming and DSA?

Why Learn Programming and DSA?

Effective Learning Techniques

Let's begin learning!


Choosing a Programming Language

Understanding Problem Solving Platforms

Complete checklist on what to prepare

Additional Challenges
Creating Realistic Goals, Timeframes and Study Schedule

Staying Motivated

Overcoming Hurdles

Finding a mentor/guide

Coding Patterns
Resources
____________________

About me

I'm Vasanta Kumar, a software developer, educator. I followed a similar path as many of you. I
cracked the GATE exam, did my M.Tech (Data Analytics) in NIT Trichy, landed a high-paying job at
KLA Tencor, and have been working there for the past 2 years. But my journey started with a
desire to excel in the tech field, just like you. I too was clueless when I first got started.
There's a lot of figuring things out on your own. And that's exactly what I did. Now, with
over 100k followers on my Instagram page (gurucodes.dev) appreciating my teaching, because
I've been through the entire journey myself, I understand the challenges students face while
learning to code. This experience allows me to anticipate and address every single aspect they
need to know about problem-solving, ensuring they have a comprehensive foundation. I'm
excited to giveaway this comprehensive programming and DSA roadmap to help you achieve
your coding dreams!

Follow me on Instagram: https://instagram.com/gurucodes.dev


____________________

What is Programming and DSA?


Programming is essentially giving instructions to a computer in a way it can understand. It's like
creating a recipe for the computer to follow, but instead of ingredients and cooking steps, you use
code to tell it what data to work with and what actions to take.

Data structures are like specialized containers you use to organize data in a computer's memory.
They define how the data is arranged and accessed, which plays a crucial role in how efficiently
programs can work.

Why Learn Programming and DSA?


By mastering both Programming and DSA, you'll gain the ability to:

• Think logically and solve problems efficiently

• Write clean, maintainable, and powerful code

• Prepare for technical interviews and coding challenges

• Build a strong foundation for a career in programming or software development

DSA (Data Structures and Algorithms) and problem-solving skills are very important for
securing a high-paying job in tech, and here's why:

High Demand & High-Paying Roles:

• Technical Interviews: Given the vast number of applicants, companies need a


standardized method to evaluate core programming skills, rather than a resource-
intensive, individual skills assessment for each candidate. Therefore, companies often
rely on coding exams to assess a candidate's problem-solving abilities, which can
be significantly enhanced by learning Data Structures and Algorithms (DSA).

• Technical Expertise: Strong DSA and problem-solving skills are a hallmark of skilled
developers and engineers. Companies are willing to pay a premium for these skillsets,
as they directly translate to the ability to build complex and performant systems.

• Career Growth: Strong DSA proficiency opens doors to senior developer positions,
system design roles, and even leadership opportunities in tech.
How to Develop these Skills:
• Practice with Coding Platforms: Platforms like LeetCode, HackerRank, and GeeksForG
eeks offer a variety of coding problems to practice and hone your DSA skills.
____________________

Effective Learning Techniques


Learning programming, data structures & algorithms (DSA), and problem-solving effectively
involves a combination of understanding concepts, practicing consistently, and utilizing various
resources. Here's a breakdown:
Building a Strong Foundation:
1. Pick a Programming Language: Start with a language like C++, Java, Python. They have a
lot of community support.

2. Master the Basics: Focus on core programming concepts like variables, data types,
operators, control flow statements (if/else, loops), and functions.

3. Learn About Complexity Analysis: Understand how to analyze the time and space
complexity of algorithms. This helps you choose the most efficient approach for solving
problems.

Sharpening Your DSA Skills:


1. Grasp Data Structures: Start with fundamental data structures like arrays, linked lists,
stacks, queues, trees, and graphs. Understand their operations, use cases, and trade-offs.

2. Explore Algorithms: Dive into common algorithms like searching, sorting, dynamic
programming, recursion, and backtracking. Practice implementing them in code.

3. Practice, Practice, Practice: The key to mastering DSA is solving problems. Utilize online
platforms like HackerRank, LeetCode, or Codeforces. Start with easy problems and gradually
progress to more challenging ones.

Developing Problem-Solving Skills:


1. Break Down Problems: When faced with a problem, break it down into smaller, more
manageable sub-problems. This will make the solution clearer and easier to implement.

2. Identify Patterns: Look for patterns in problem statements and existing solutions. This can
help you determine the appropriate data structure or algorithm to apply. (Two-pointer,
sliding window, prefix-sum, counting sort, greedy etc.)

3. Test and Debug line-by-line in case of any error.

Practicing for Interviews:

• Find a Learning Community: Join online forums, communities, or attend coding meetups to
connect with other learners and get help when stuck.
• Participate in Coding Challenges: Take part in online coding competitions to test your skills
and knowledge against others.

• Be Patient and Persistent: Learning to code and master DSA takes time and effort. Don't
get discouraged by setbacks; keep practicing and learning from your mistakes.
____________________

Choosing your programming language


Here's a comparison table of C++, Java, and Python for competitive programming and problem-
solving:

Feature C++ Java Python

Speed Fastest Medium Slowest

Memory Usage Manages memory Automatic garbage Automatic garbage


manually collection collection

Syntax More complex Medium Simplest

Readability Can be less More readable Most readable


readable

Development Longer Medium Shorter


Time

Libraries Extensive (STL) Large and diverse Extensive (SciPy,


NumPy)

Learning Curve Steeper Moderate Gentlest

Competitive Best for efficiency- Good all-rounder Not ideal for tight
Programming critical problems time/memory
constraints

Advantages:

• C++: Unmatched speed and memory control for complex algorithms. Large community and
resources for competitive programming.

• Java: Platform-independent, good balance of speed and readability with extensive libraries.
Large developer community.

• Python: Short development time, easy to learn and read. Extensive libraries for data science
and machine learning problems.

Disadvantages:
• C++: Complex syntax and manual memory management can lead to errors. Steeper learning
curve.

• Java: Can be verbose compared to Python. Slower execution speed compared to C++.

• Python: Not ideal for problems with tight time or memory constraints due to slower
execution speed. While convenient, its built-in functions might hurt long-term problem-
solving skills.

Choosing the right language:


• For competitive programming with a focus on efficiency, C++ is the go-to choice.

• If you value readability, ease of development, and a good balance of speed, Java is a solid
option.

• Python is a great choice for problems with a strong emphasis on data manipulation and
prototyping but might not be ideal for highly optimized solutions.
____________________

Problem-Solving and its Platforms


DSA problem-solving involves applying your knowledge of data structures (arrays, linked lists,
trees, etc.) and algorithms (sorting, searching, dynamic programming, etc.) to devise efficient
solutions for real-world or coding challenge scenarios. It's a crucial skill for programmers, as it
helps building:

• Logical Thinking, Algorithm Selection, Code Implementation, Efficiency Analysis.

Problem-Solving Platforms (LeetCode, HackerRank, etc.):

• LeetCode and HackerRank are popular online platforms that offer a vast collection of
coding challenges categorized by difficulty level, topic (arrays, strings, trees, graphs, etc.),
and company interview questions (for targeted preparation).

• Features:

• Interactive Coding Environment: Code, compile, and test your solutions directly on
the platform.

• Test Cases: Verify your code's correctness with provided test cases.

• Discussions: Learn from other users' approaches and insights.

• Contests: Participate in timed coding competitions to improve your skills under


pressure.

• Skill Tracking: Monitor your progress and identify areas for improvement.

How to Use These Platforms:


1. Choose Your Level: Start with easier problems to build your foundation and gradually
increase the difficulty as you progress.

2. Read the Problem Statement Carefully: Understand the input format, expected output,
and any constraints (time/memory limits).

3. Plan Your Approach: Think about the data structures and algorithms that might be suitable
for solving the problem. Consider edge cases and potential optimizations.

4. Code Implementation: Write your code, ensuring clarity, efficiency, and correct handling of
inputs.

5. Test and Debug: Use the provided test cases and write your own to catch errors.
6. Analyze Time and Space Complexity: Understand how your solution performs for different
input sizes.

7. Compare Solutions: See how other users approached the problem and learn from different
techniques. (Very very crucial)

Additional Tips:
• Focus on Understanding, Not Just Getting the Answer.

• Practice Regularly.

• Don't Be Afraid to Ask for Help: Utilize the platform's discussion forums or online
communities to seek guidance if you're stuck.
____________________

Let's begin learning!


Start Here ⬇
Module 1: Command Prompt Module 2: VS Code

History What are code editors/text editors?


Types of OS Visual Studio Code
Why Servers prefer CLI over GUI? Installing Visual Studio Code

Why should you learn Command Opening VS Code from


Prompt? explorer/command prompt

How CMD is same as using a full OS? Opening Files & Folders

Absolute and Relative Paths Creating Files & Folders

A Command: Command + Arguments Adding Plugins

Getting started with basic commands Opening Command Prompt from Code
Editor
Working with Folders: Creating,
moving, deleting etc. Revision
Moving around folders

Listing files from folders

Working with files: Creating, updating,


deleting files

Revision

Module 3: Introduction to Programming Module 4: Data Types and Variables

Programming and Benefits Data Types

CPP Introduction and Benefits Variables

Compilers and Lifecycle of a Program Variables of Different Data Types

Install GCC Compilers Problems on Variables

Compiler and run your first program ASCII Table


First Program Type Conversions

Comments Macros & Type Range Macros

Revision & basic problem solving Revision & basic problem solving

Module 5: Input_Output Module 7: Operators:

Input Introduction to Operators

Output Arithmetic Operators

Relational Operators
Module 6: Maths required for Problem
Bitwise Operators
Solving
Logical Operators
Number Systems Assignment Operators

Binary Number System Increment Operators

Converting one number system to Miscellaneous


another
Operator Precedence
Division, Modulus
Basic problems on all the above topics
Factors, multiples of a number
Bit Manipulation(Should have been a
LCM, HCF whole new module)
Prime Number, Prime Factorization Bit Manipulation Concepts

AP Series, Factorial Revision

Matrices (Basics)

Graph Theory (Can also be learnt later)

Revision

Module 8: Problem Solving Module 9: Conditional Statements

Problem Solving Introduction If else conditions

Problem Format Ternary Operator

Understanding Constraints Nested If else

Reading an integer variable and Determine if a person is eligible for


printing the same in console. voting
Reading different data type variables If a number is even or odd?
and printing the same in console.
Check if a number is divisible by 6?
Sum of 2 numbers
Minimum of 2 numbers
Swap 2 numbers
Maximum of 2 Numbers
Swap 2 numbers without using third
Minimum of 3 numbers
variable
Maximum of 3 numbers
Write a function that converts a
temperature from Fahrenheit to Whether a number is positive, negative
Celsius. or zero?

Write a program that calculates the Leap year or not?


simple interest. Switch-Case
Cube of a number Revision of above problems
Inbuilt functions: abs, power, sqrt

Debugging

Watch variables

Revision of above problems

Module 10: Loops Module 11: Variables & Scope

For Loop Default/garbage values of Variables


Tricky question - what is for(::) {} Local Variables
Tricky question - dummy loops Global Variables
for();

While Loop Module 12: Functions

Converting for loop to while loop


Functions Introduction
Converting while loop to for loop
return
Different ways of solving the same
problem with minor tweaks in the for Passing Parameters
loop Call by value
Read input elements till EOL (when no Call by reference
size is given) .
Problems on Loops(solve with both Function Scope
while loops and for loops)
Practice functions by solving the
Print 1-100 numbers previous questions(Very important to
Print numbers from 100-1 understand the working of functions)

Print only the odd numbers Revision

Sum of 1-100 numbers


Module 13: Strings
Sum of first N numbers

Revision of above problems String Fundamentals


Print digits of a number String Input and Output
Sum of digits of a number String Manipulation
Reverse a number Substrings
Finding 2 power x Finding substrings to locate a
Finding x power y substring's starting position

Multiplication table String conversion(uppercase to


lowercase and lowercase to uppercase)
Palindrome
String Comparison
Check Prime Number
String Tokenization
Generate the Fibonacci series
Practice
Find maximum element among
the given inputs Linear Search

Find the minimum element Write a function that reverses a given


among the given inputs string

Revision of above problems Write a function that checks if a given


string is a palindrome (reads the same
Sum of numbers in a given range backward as forward) regardless of case
Prime number within a given Write a function that counts the number
range of vowels (a, e, i, o, u) in a given string,
Armstrong number handling both uppercase and lowercase
vowels
Determine if a number is perfect
square Write a function that removes all
punctuation characters from a given
Adding factorials (For Example:
string
1!+ 2!+ 3!+ 4!+ 5!)
Maximum number consecutive Write a function that counts the number
same numbers among the given of words in a given string
input
Write a function that replaces all
Factorial of a number occurrences of a specific character or
substring with another character or
Factors of a number
substring in a string
LCM, HCF
Write a function that checks if two
Do-While loop strings are anagrams of each other
(contain the same letters with the same
Nested Loops
frequency)
Different Pattern related
Write a function that rotates a string by
questions(Google and have a look at
a given number of characters (e.g.,
them)(Very very important)
rotate "Hello, world!" by 2 becomes "!lo,
Revision of above problems worldHel")

Revision

Module 14: Data Structures & Algorithms Module 15: Searching

Introduction to Data Structures Linear Search vs Binary Search

Why Data Structures Binary Search : Understanding


time/space complexity
Time & Space Complexity
Modify the binary search function to
Understand Logarithm, Power, and
find the first or last occurrence of a
Root Functions
target element in a sorted array that
Try answering time and space may contain duplicates.
complexities of previously solved
Overflow case = (low+high) /2 ➝
questions.
alternative low + (high-low)/2
Algorithms
Revision
Revision

Module 16: Arrays Module 17: Sorting Algorithms

Array Fundamentals Bubble Sort

Array Operations Selection Sort

Write a function to find the largest or Insertion Sort


smallest element in an array
Merge Sort
Write a function to calculate the sum Quick Sort
of all elements in an array
Need for different Sorting Algorithms
Implement linear search to find a
Revision
specific element in an array

Implement binary search to find a


Module 18: Stacks
specific element in an array

Write a function to reverse the order Stack Fundamentals


of elements in an array
Stack Operations Practice
Given an array containing consecutive
Write a function that uses a stack to
numbers with one missing number,
check if parentheses (round, square,
find the missing number (assuming no
curly) in a string are balanced (e.g.,
duplicates)
((({}))) is balanced)
Write a function to check if an array
Write code to implement a stack using
contains duplicate elements. Start with
arrays
simpler cases like sorted arrays or
arrays with a limited range of values Write a function that uses a stack to
convert an infix expression (e.g., a + b
Rearrange array alternatively
* c ) to a postfix expression (e.g., a b
Sort an array of 0s, 1s and 2s c * +)
Write a function to move all zeroes in Write a function that uses a stack to
an array to the end while maintaining evaluate a postfix expression (see above
the relative order of other elements question) and return the result.
Given an array of numbers and a Revision
target sum, find two numbers that add
up to the target sum (assuming there's
Module 19: Queues
one unique pair)

Merge 2 sorted arrays.


Queue Fundamentals
Trapping Rain Water Queue Operations Practice
Chocolate Distribution Problem Write code to implement a queue using
Stock buy and sell either arrays

Spirally traversing a matrix Given a queue containing characters,


write a function to check if the queue is
Revision
a palindrome

Explore how you can implement queue-


like behaviour using two stacks
Revision

Module 20: Linked Lists Module 21: Trees

Linked Lists Fundamentals Trees Fundamentals

Linked Lists Practice Trees Operations & Practice

Singly Linked List Trees Traversal

Doubly Linked List Trees Searching

Circular Linked List Trees Insertion

Write code to create a basic singly Trees Deletion


linked list with functionalities like
Binary Search Tree
adding nodes, printing the list, and
finding the length Write code to create a basic binary tree
with functionalities like adding nodes,
Write a function to reverse the order
printing the tree (pre-order, in-order,
of nodes in a linked list (e.g., 1 -> 2 -> 3
post-order), and finding the height
becomes 3 -> 2 -> 1)
Write a function to verify if a given
Write a function to determine if a
binary tree is a binary search tree (BST)
linked list contains a cycle (a loop
where a node points back to an earlier Search for a specific value in a BST
node) Find the minimum or maximum
Write a function to merge two sorted element from BST efficiently
linked lists into a new sorted linked list Write a function to find the depth of a
Write a function to remove duplicate specific node in a tree (the number of
nodes from a sorted linked list. Start edges from the root node to that node)
with a simpler case where duplicates Write a function to calculate the sum of
are consecutive all node values in a tree using a chosen
Write a function to find the middle traversal method.
node in a linked list (efficiently handle Implement a function to check if a
even and odd lengths) binary tree is balanced (all leaves have
Write a function to find the Nth node roughly the same depth)
from the end of the linked list Write a function to create a mirror
(consider cases where N is greater image of a binary tree (left subtree
than the list length) becomes right subtree and vice versa)
Write a function to calculate the sum Revision
of all elements in a linked list
Write a function to create a deep copy
of a linked list, ensuring a new list with
independent nodes

Revision

Module 22: Heaps Module 23: Graphs

Heaps Introduction Graphs Introduction

Min-Heap Nodes, Vertices

Max-Heap Directed Graphs vs Undirected Graphs

Remove and return the root node Weighted vs Unweighted Graphs


(min/max element) while maintaining
Adjacency List
the heap property
BFS, DFS
Add a new element to the heap and re-
arrange nodes to maintain the heap Implement BFS to traverse a graph and
property print the nodes visited in the order they
are explored.
Change the value of an existing node
in the heap Implement DFS to traverse a graph

Write code to create a min-heap using Write a function using DFS to determine
an array, with functionalities like if an undirected graph contains a cycle
insert, extract minimum, and printing (a loop where a node connects back to
the heap in level order itself or an ancestor).

Similar to above question, but Check for Connected Components: In


implement a max-heap an undirected graph, connected
components are groups of nodes
Given an array, write a function to
reachable from each other
determine if it represents a valid min-
heap or max-heap based on the heap Given a weighted undirected graph, find
property. a subset of edges that connects all
nodes with the minimum total weight,
Find the kth largest element in an
forming a tree structure. Start with
array efficiently using a min-heap. Add
simpler cases like Kruskal's algorithm
elements to the heap, ensuring it only
for dense graphs.
contains the k largest elements, and
then return the root (minimum) which Find the number of islands
will be the kth largest element. Find whether path exist
Given an array of k sorted linked lists, Minimum Cost Path
write a function using a min-heap to
Dijkstra's algorithm
merge them into a single sorted linked
list. Bellman-Ford algorithm

Understand the basic concept of Prim's algorithm


Huffman coding for data compression, Kruskal's algorithm
which uses a min-heap to assign codes
Revision
based on symbol frequencies.

Revision

Module 24: Hashing Module 25: Recursion

Hash Table Recursion Introduction

Collision Resolution Techniques Benefits and Drawbacks

STL: Set, Map Write a function that calculates the


factorial of a non-negative number (n!)
Time & Space Complexity of Set & Map
using recursion
Use a hash table to count the
Implement a function that generates
occurrences of each word in a given
the Fibonacci sequence using recursion
text string.
Write a recursive function to find the
Given two strings, write a function
greatest common divisor (GCD) of two
using a hash table to check if they are
positive integers using the Euclidean
anagrams (have the same letters but
algorithm
possibly in a different order).
Implement a function that reverses a
Relative Sorting
string using recursion
Sorting Elements of an Array by Frequ
Write a recursive function to perform
ency
binary search on a sorted array
Largest subarray with 0 sum
Implement a function to calculate the
Common elements sum of all elements in an array using
Count distinct elements in every windo recursion
w Write a function to check if a string is a
Array Subset of another array palindrome using recursion

First element to occur k times Given a binary tree structure,


implement a recursive function to
Revision
perform an in-order traversal
Revision

Module 26: Greedy Algorithms Module 29: Dynamic Programming

Sorting Dynamic Programming Concept

Activity Selection Bottom-Up vs. Top-Down Approach

N meetings in one room Fibonacci Series using DP

Coin Piles Minimum Operations

Maximize Toys Max length chain

Largest number possible Minimum number of Coins

Minimize the heights Longest Common Substring

Minimize the sum of product Longest Increasing Subsequence

Geek collects the balls Longest Common Subsequence

Revision 0 – 1 Knapsack Problem

Maximum sum increasing subsequence


Module 27: Divide and Conquer
Minimum number of jumps

Divide and Conquer Concept Edit Distance

Find the element that appears once in Coin Change Problem


sorted array Subset Sum Problem

Search in a Rotated Array Box Stacking


Binary Search Rod Cutting
Sum of Middle Elements of two sorted Path in Matrix
arrays
Minimum sum partition
Quick Sort
Count number of ways to cover a distan
Merge Sort ce
K-th element of two sorted Arrays Egg Dropping Puzzle
Revision Optimal Strategy for a Game

Shortest Common Supersequence


Module 28: Backtracking
Revision

Backtracking Concept
N-Queen Problem
Module 30: Trie
Solve the Sudoku

Rat in a Maze Problem Trie Concept


Word Boggle Trie Implementation
Generate IP Addresses Given an array of strings, find the
Implement Permutation of an Array longest common prefix shared by all
strings. Use a trie to efficiently traverse
Revision
the shared prefix path.

Revision

Module 31 - Suffix Trees Module 32 - Advanced Data Structures

Suffix trees and arrays Bloom Filters

Suffix Tree Operations Self-Balancing Trees

Practical Implementation Red-Black Trees

Applications Segment Trees

Longest Common Substring Problem Disjoint Sets

Longest Repeated Substring Problem LRU Cache

Longest Palindromic Substring Skip List


Problem
Revision
Revision
____________________

Essential Coding Patterns

1. Two Pointers:
• Pros: Brings time complexity of O(n^2) to O(n)

• Challenges: Might take some time to get used to the pointer's movement.

Example Problems:
1. Pair with Target Sum

2. Find Non-Duplicate Number Instances

3. Squaring a Sorted Array

4. Triplet Sum to Zero

2. Sliding Window:
• Pros: Mostly used in problems involving subarrays. Brings time complexity of O(n^2) to O(n)

• Challenges: Takes time to understand how to adjust the window size based on the problem.

Example Problems:
1. Maximum Sum Subarray of Size K

2. Fruits Into Baskets

3. Longest Substring with K Distinct Characters

4. Longest Substring with Same Letters after Replacement

3. Island (Matrix Traversal) Pattern


• Challenges: Complex and occupies more space.

Example Problems:
1. Number of Islands
2. Biggest Island

3. Flood Fill

4. Slow and Fast Pointers


• Used mainly for:
• Cycle Detection

• Finding Middle Elements

Example Problems:
1. LinkedList Cycle

2. Middle of the LinkedList

3. Palindrome LinkedList

5. Counting Sort
• Usage: to sort elements when the range of elements is small.

Example Problems:
1. Height Checker - LeetCode

2. Array Partition - LeetCode

6. Merge Intervals
• Used mainly for:

• Overlapping Intervals

• Interval Scheduling

Example Problems:
1. Merge Intervals

2. Insert Interval

3. Intervals Intersection
7. Cyclic Sort
• Used mainly for:

• Consecutive Numbers

• In-Place Sorting

Example Problems:
1. Find the Missing Number

2. Find all Duplicates

3. Duplicates In Array

8. In-place Reversal of a Linked List


Usage: Used for reversing a Sub-Linked List or Sub-list/array.

Example Problems:
1. Reverse a LinkedList

2. Reverse a Sub-list

3. Reverse Every K-element Sub-list

9. Subsets
• Used mainly for:
• Combinatorial Problems

• Exhaustive Search

Example Problems:
1. Subsets

2. Subsets With Duplicates

3. Permutations

10. Modified Binary Search

Example Problems:
1. Order-agnostic Binary Search
2. Ceiling of a Number

3. Next Letter

11. Bitwise XOR


• Used mainly for:

• Finding Missing or Duplicate Numbers

• Bit Manipulation

Example Problems:
1. Single Number

2. Two Single Numbers

3. Complement of Base 10 Number

12. Top 'K' Elements


• Used mainly for:

• Priority Queue

• Streaming Data

Example Problems:
1. Top 'K' Numbers

2. Kth Smallest Number

3. ‘K’ Closest Points to the Origin

13. K-way Merge


• Used mainly for:

• Multiple Sorted Arrays

• External Sorting

Example Problems:
1. Merge K Sorted Lists
2. Kth Smallest Number in M Sorted Lists

3. Find the Smallest Range Covering Elements from K Lists

14. Topological Sort


• Used mainly for:

• Task Scheduling

Example Problems:
1. Topological Sort

2. Tasks Scheduling

3. Tasks Scheduling Order

15. Trie
• Used mainly for:

• Autocomplete

• Spell Checker

• IP Routing

Example Problems:
1. Insert into and Search in a Trie

2. Longest Common Prefix

3. Word Search

16. Monotonic Stack


• Used mainly for:

• Next Greater or Smaller Element

• Maximum Area Histogram

Example Problems:
1. Next Greater Element (NGE) for every element in given Array
2. Next Smaller Element

3. Largest Rectangular Area in a Histogram using Stack

4. The Stock Span Problem

17. 0/1 Knapsack


• Used mainly for:
• Resource Allocation

• Budgeting

Example Problems:
1. 0/1 Knapsack

2. Equal Subset Sum Partition

3. Subset Sum

18. Prefix Sum

Example Problems:
1. Equilibrium index of an array

2. Find if there is a subarray with 0 sums

3. Maximum subarray sum modulo m

4. Maximum occurred integer in n ranges

Resources:
1. book.pdf (cses.fi)

2. Main Page - Algorithms for Competitive Programming (cp-algorithms.com)

Visualization Tools:
1. Algorithm Visualizer (algorithm-visualizer.org)

2. visualising data structures and algorithms through animation - VisuAlgo


Additional Challenges
Creating Realistic Goals, Timeframes and Study Schedule

Staying Motivated

Overcoming Hurdles

Finding a mentor/guide

By following this comprehensive roadmap, you'll develop the capabilities to confidently pursue
jobs with salaries ranging 10, 20 LPA and even more.

You'll also have to learn :


Aptitude (only for freshers)

OOPS Concepts,

Operating Systems Concepts

Database Concepts

Networking Concepts

System Design Basics (Very few big tech companies ask this. So, can be ignored)

Syllabus to cover for different packages:

4-6 LPA (Mostly service-based 6-20LPA (Mostly product-based


companies) companies)

• Focus: Providing expertise and • Focus: Creating and selling


manpower to develop, maintain, software products or applications.
and manage client projects. Examples: Zoho, Flipkart,
Examples: TCS, Infosys, Wipro. MakeMyTrip.

• Work: Relies on client requirements • Work: Develops and maintains a


and specifications. Can involve core product, requiring strong
diverse projects and technologies. focus and expertise in that domain.

• Scalability: Limited scalability as • Scalability: High scalability; a


adding more clients requires more successful product can serve
manpower. millions with minimal additional
manpower.
• Learning: Opportunity to learn a • Learning: Deep expertise in
wide range of technologies but may specific technologies related to the
lack depth in specific areas. product.

• Compensation: Generally offer • Compensation: Often offer


competitive salaries but may be higher salaries and stock options
lower than product-based due to growth potential.
companies on average.

• Learn Modules 1-21 along with • Requires in-depth knowledge of


aptitude, OOPS basics and DBMS everything mentioned in our
basics. modules.

While some of the above concepts can be learnt quickly, mastering Data Structures & Algorithms
(DSA) and problem-solving skills takes dedicated practice, typically ranging from 6 months to 2
years.

You can solve problems from Leetcode to get more expertise on each topic.
Feel free to take a printout of the roadmap and use it as a checklist to track your progress.

Remember, consistency is key! Dedicate some time daily or weekly to practice, even if it's just
solving a few problems.

You might also like