Infosys SP/DSE Round 2 is approaching, and if your DSA preparation is weak, this is not the time to panic or randomly solve hundreds of problems. The better strategy is to identify your current level, focus on high-value patterns, practise representative questions, and learn how to recognize the pattern quickly during the coding assessment.
Important: The questions below should be treated as pattern practice, not predictions of the exact questions that will appear. The objective is to make you comfortable with the techniques that can repeatedly appear in coding assessments.
Which Category of Student Are You?
Category 1 — New to Coding or Very Weak in DSA
If you are genuinely new to coding and only have a few days left, do not suddenly start learning advanced Dynamic Programming, Graph algorithms and difficult Tree problems from scratch. That is unlikely to be the highest-return use of your remaining preparation time.
Instead, concentrate on Greedy, Sliding Window/Two Pointer, HashMap/Prefix Sum and Bit Manipulation. Learn the basic idea behind each pattern and solve representative Easy/Medium questions. Your realistic target should be to solve the easiest problem completely and, if necessary, obtain a correct baseline solution for another problem rather than spending the entire examination on one difficult optimization.
Category 2 — Intermediate DSA but Weak in DP/Graph/Tree
If you already know arrays, strings, sorting, recursion and basic data structures, your biggest problem is probably pattern recognition. For this category, spend most of your remaining preparation time on DP/Knapsack/Partition, Graph BFS/DFS/Topological Sort/Shortest Path and Tree recursion.
Do not simply watch tutorials. Learn a template, close the notes, and code the problem yourself. For DP, remember the sequence: State → Transition → Base Case → Iteration Order → Answer. For trees, first decide exactly what your recursive function returns to its parent. For graphs, identify whether the problem is about reachability, components, ordering, shortest path or minimum connection cost.
Category 3 — You Already Know DP, Graph and Tree
If you are already comfortable with advanced DSA, stop spending most of your time on beginner tutorials. Your advantage now comes from speed, pattern switching, edge-case handling and hidden-test robustness.
Use timed mixed sets, LeetCode contests, CodeChef contests and Infosys-style PYQ practice. Try solving three or four unseen problems under a strict time limit. After every session, record whether your failure came from pattern recognition, implementation bugs, complexity, edge cases or time management.
The 80 Questions You Should Practise
The following list follows the pattern-wise structure of the preparation PDF. Direct LeetCode matches are linked wherever a suitable problem exists. For generic academic patterns such as classic 0/1 Knapsack or a particular interview formulation, a closely related practice problem or search page is provided instead of pretending that there is an exact LeetCode equivalent.
1. Greedy — Must Do
Greedy problems are especially useful when preparation time is short. The key is not merely memorizing the answer; understand why a local choice is safe.
- Activity Selection — Sort activities by finishing time and repeatedly choose the earliest finishing compatible activity. Practise Activity Selection
- Jump Game — Track the farthest position reachable so far. LeetCode #55 — Jump Game
- Jump Game II — Treat reachable ranges almost like BFS layers and greedily extend the next range. LeetCode #45 — Jump Game II
- Gas Station — Understand why a failed starting point can be skipped. LeetCode #134 — Gas Station
- Partition Labels — Use the last occurrence of every character to determine partition boundaries. LeetCode #763 — Partition Labels
- Assign Cookies — Sort both arrays and satisfy the smallest requirement first. LeetCode #455 — Assign Cookies
- Non-overlapping Intervals — Keep intervals that finish earliest. LeetCode #435 — Non-overlapping Intervals
- Minimum Arrows to Burst Balloons — Sort by endpoint and place an arrow at the earliest possible endpoint. LeetCode #452 — Minimum Number of Arrows
- Boats to Save People — Sort and use two pointers to pair the heaviest person with the lightest whenever possible. LeetCode #881 — Boats to Save People
- Task Scheduler — Reason about the most frequent task and the required idle slots. LeetCode #621 — Task Scheduler
2. Sliding Window / Two Pointer — Must Do
Sliding Window is one of the most valuable patterns for a short preparation window. Before coding, clearly define what makes your current window valid.
- Longest Substring Without Repeating Characters — Variable-size window with last-seen/frequency information. LeetCode #3
- Longest Repeating Character Replacement — Maintain a window where window length minus maximum frequency is at most k. LeetCode #424
- Permutation in String — Practise a fixed-size frequency window. LeetCode #567
- Minimum Window Substring — Expand until valid, then contract while maintaining validity. LeetCode #76
- Fruit Into Baskets — Longest subarray containing at most two distinct values. LeetCode #904
- Max Consecutive Ones III — Maintain a window containing at most k zeroes. LeetCode #1004
- Subarray Product Less Than K — Multiplicative sliding window for positive numbers. LeetCode #713
- Count Number of Nice Subarrays — Learn the exactly-k technique using atMost or prefix counting. LeetCode #1248
- Longest Subarray With At Most K Frequency — Maintain frequency constraints while moving the window. LeetCode #2958
- 3Sum — Sort, fix one element, and use two pointers while handling duplicates. LeetCode #15 — 3Sum
3. HashMap / Prefix Sum — Must Do
HashMap and prefix-sum techniques are powerful because they frequently transform an apparently quadratic subarray problem into an O(n) expected-time solution.
- Two Sum — Store complements in a hash map. LeetCode #1 — Two Sum
- Subarray Sum Equals K — Prefix sum plus frequency map; remember that negative numbers can exist. LeetCode #560
- Subarray Sums Divisible by K — Store prefix-sum remainders and handle negative modulo carefully. LeetCode #974
- Longest Subarray With Sum K — Store the earliest index of each prefix sum. Practise Longest Subarray With Sum K
- Longest Consecutive Sequence — Hash set plus sequence-start detection. LeetCode #128
- Group Anagrams — Create a canonical frequency/signature key. LeetCode #49
- Top K Frequent Elements — Frequency map followed by heap or bucket techniques. LeetCode #347
- First Unique Character in a String — Frequency counting followed by a second traversal. LeetCode #387
- Longest Zero-Sum Subarray — Equal prefix sums identify a zero-sum range. Practise Longest Zero-Sum Subarray
- Count Subarrays With XOR K — Prefix XOR plus frequency map. Practise XOR K
4. Bit Manipulation — Must Do
Bit Manipulation has a comparatively small set of recurring ideas. Learn XOR, shifts, set-bit operations and the lowest-set-bit trick properly.
- Single Number — XOR cancels equal pairs. LeetCode #136
- Single Number II — Count bits when other numbers occur three times. LeetCode #137
- Counting Bits — Use a recurrence based on removing the lowest set bit. LeetCode #338
- Power of Two — A positive power of two has exactly one set bit. LeetCode #231
- Number of 1 Bits — Practise Brian Kernighan’s lowest-set-bit technique. LeetCode #191
- Missing Number — XOR indices and values. LeetCode #268
- Reverse Bits — Construct the result bit by bit for a fixed-width integer. LeetCode #190
- Divide Two Integers — Use shifts and subtraction without normal multiplication/division. LeetCode #29
- Maximum XOR of Two Numbers in an Array — Learn trie-based or greedy-prefix reasoning. LeetCode #421
- Bitwise AND of Numbers Range — Find the common high-bit prefix. LeetCode #201
5. DP — Knapsack / Partition / Subset
If you belong to Category 2, this section deserves serious attention. Do not memorize individual solutions. Learn the take/skip transition, subset reachability, counting DP and unbounded-choice patterns.
- 0/1 Knapsack — Learn the take/skip transition and both 2D and 1D implementations. Practise 0/1 Knapsack
- Subset Sum — Boolean DP asking whether a target sum is reachable. Practise Subset Sum
- Partition Equal Subset Sum — Convert equal partition into subset-sum. LeetCode #416
- Count of Subsets With Sum K — Counting DP; pay attention to zero values. Practise Count of Subsets
- Target Sum — Understand the transformation from sign assignment to subset sum. LeetCode #494
- Minimum Difference Partition — Calculate reachable sums and minimize the difference between two partitions. Practise Minimum Difference Partition
- Coin Change — Unbounded choice where the objective is minimizing the number of coins. LeetCode #322
- Coin Change II — Count combinations and understand why loop order matters. LeetCode #518
- Unbounded Knapsack — Learn how reusable items change the iteration pattern. Practise Unbounded Knapsack
- Partition Array for Maximum Sum — Partition DP over the previous k positions. LeetCode #1043
6. Graph — BFS / DFS / Topological Sort / Shortest Path
For intermediate students, Graph preparation should be template-driven. First determine what the nodes and edges represent. Then decide whether you need DFS, BFS, Topological Sort, Dijkstra, bounded shortest path or MST.
- Number of Islands — Grid DFS/BFS and visited marking. LeetCode #200
- Rotting Oranges — Multi-source BFS where levels represent time. LeetCode #994
- Clone Graph — Map original nodes to cloned nodes while traversing. LeetCode #133
- Detect Cycle in Undirected Graph — Use DFS parent tracking or DSU. Practise Cycle Detection
- Detect Cycle in Directed Graph — Use DFS colors/recursion stack or Kahn’s algorithm. Practise Directed Cycle Detection
- Course Schedule II — Topological ordering combined with cycle detection. LeetCode #210
- Network Delay Time — Dijkstra with a min-heap and stale-entry handling. LeetCode #743
- Cheapest Flights Within K Stops — Practise bounded relaxations/layered shortest-path thinking. LeetCode #787
- Word Ladder — BFS on an implicit graph. LeetCode #127
- Minimum Cost to Connect All Points — Minimum Spanning Tree using Prim or Kruskal. LeetCode #1584
7. Trees / BST — Recursion + Tree DP
Tree questions become much easier once you clearly define what each recursive call returns. Practise basic traversal first, then move toward LCA, path sums, construction and tree DP.
- Maximum Depth of Binary Tree — Base case plus maximum child depth. LeetCode #104
- Diameter of Binary Tree — Postorder height calculation plus a global diameter. LeetCode #543
- Balanced Binary Tree — Return height or a failure sentinel. LeetCode #110
- Validate Binary Search Tree — Use valid bounds or inorder monotonicity. LeetCode #98
- Kth Smallest Element in BST — Remember that inorder traversal of a BST is sorted. LeetCode #230
- Lowest Common Ancestor of Binary Tree — Recursively combine child results. LeetCode #236
- Path Sum III — Prefix-sum map over root-to-node paths. LeetCode #437
- Construct Binary Tree from Preorder and Inorder Traversal — Index map plus recursive boundaries. LeetCode #105
- Binary Tree Maximum Path Sum — Return the best downward path and update the global path through each node. LeetCode #124
- All Nodes Distance K in Binary Tree — Build parent relationships and run BFS from the target. LeetCode #863
8. Binary Search on Answer / Intervals
Binary Search on Answer is an important optimization technique. The central question is whether the feasibility condition is monotonic. Interval problems generally begin by sorting by start or finish time and then maintaining an appropriate invariant.
- Search in Rotated Sorted Array — At least one half of the array remains sorted. LeetCode #33
- Find First and Last Position of Element in Sorted Array — Practise lower-bound and upper-bound style binary search. LeetCode #34
- Koko Eating Bananas — Binary search the minimum feasible eating speed. LeetCode #875
- Capacity to Ship Packages Within D Days — Binary search the capacity and use greedy feasibility checking. LeetCode #1011
- Aggressive Cows — Binary search the minimum possible distance and greedily place cows. Practise Aggressive Cows
- Split Array Largest Sum — Binary search the maximum allowed segment sum. LeetCode #410
- Merge Intervals — Sort by starting point and merge overlapping intervals. LeetCode #56
- Insert Interval — Insert the new interval and merge affected ranges. LeetCode #57
- Non-overlapping Intervals — Practise interval selection by keeping the earliest finishing interval. LeetCode #435
- Minimum Number of Meeting Rooms — Use endpoint sweeping or a min-heap of ending times. Practise Meeting Rooms
How Should You Use These 80 Questions?
Do not try to solve all 80 questions blindly in one sitting. The objective is to recognize the underlying pattern. If you solve Jump Game, Gas Station and Partition Labels, you should be able to explain why greedy works. If you solve several Sliding Window problems, you should start identifying the window condition before writing code.
For Category 1 students, prioritize questions 1–40. You do not need to become an expert in every question. Learn the basic patterns, solve representative questions, then move toward PYQ-style practice.
For Category 2 students, prioritize questions 41–80, especially DP, Graph and Tree questions. Re-code important problems without looking at the solution. If you can understand the template but cannot implement it from memory, you are not finished yet.
For Category 3 students, use the entire list as a revision checklist and spend more time on timed contests, mixed problem sets and previous-question-pattern practice. The goal is no longer simply learning algorithms; it is solving correctly under pressure.
What Should You Do During the Final 5–6 Days?
- First, identify your category. Do not follow an advanced student’s preparation plan if you are a beginner.
- Learn patterns instead of collecting questions. Ten questions from one pattern can be more useful than fifty random problems.
- Practise coding without copying. After understanding a solution, close it and implement it again.
- Use timed practice. Simulate the pressure of a coding assessment rather than solving every problem casually.
- Keep a failure log. Write down whether the problem was a pattern-recognition mistake, implementation bug, complexity problem or edge-case failure.
- Do not spend the entire test on one Hard problem. Secure easier opportunities first and return to difficult questions later.
- Test edge cases. Empty arrays, one-element arrays, duplicate values, negative numbers, integer overflow, boundary indices and large inputs can destroy an otherwise correct-looking solution.
What If You Cannot Solve the Optimal Solution?
If you cannot immediately find the optimized approach, first think about whether you can produce a correct baseline solution. A brute-force solution may not pass every hidden test, but a correct baseline can be more useful than leaving a question completely unanswered.
However, do not intentionally submit inefficient code when you already know that the constraints require optimization. The goal should always be to improve the complexity once the baseline is working. In a coding assessment, correctness, complexity and hidden-test robustness all matter.
Final Priority Order
If you have only a few days, a practical priority order from this preparation guide is:
- DP — Knapsack / Partition / Subset
- Graph — BFS / DFS / Topological Sort / Shortest Path
- Sliding Window / Two Pointer
- HashMap / Prefix Sum
- Trees / BST
- Binary Search on Answer / Intervals
- Greedy
- Bit Manipulation
- Segment Tree / Fenwick Tree only if you already have the basics under control
This ordering should not be interpreted as an official Infosys ranking. It is a preparation strategy based on the supplied reference material and the objective of maximizing useful practice during a short preparation window.
Final Message for Students
If you are weak in DSA, do not confuse lack of confidence with lack of ability. With only a few days left, you cannot learn everything. But you can become much better at a limited number of high-value patterns.
If you are a beginner, focus on Greedy + Sliding Window + HashMap/Prefix Sum + Bit Manipulation. If you are intermediate, focus on DP/Knapsack + Graph + Tree. If you already know advanced DSA, stop learning from scratch and focus on contests, timed practice, PYQs and speed.
The uploaded preparation guide itself emphasizes that this is a probability-maximizing strategy rather than a promise of exact questions. Use the 80 questions as a structured checklist, not as a guarantee of what will appear in the assessment.
Most importantly: do not spend your final days randomly jumping between hundreds of questions. Pick your category, follow the relevant patterns, practise deliberately, review your mistakes and enter the assessment with a clear strategy.
Watch the full preparation video and follow the PYQ series: YouTube — @PrashantKumar.957
Source note: This article is based on the supplied Infosys SP/DSE preparation PDF, which identifies three student categories, recommends pattern-based preparation, and provides the 80-question checklist. The PDF explicitly states that its preparation guidance is unofficial and is not a guaranteed Infosys question list.



