Tools
Back to Company Prep

Infosys

HackWithInfy 2026 — Complete Prep Guide

Round-by-round question patterns, past problem types, track-specific roadmaps, and Grand Finale prep. SP (₹9.5 LPA) to Champion (₹21 LPA).

Round 1 Active

Max CTC

₹21 LPA

Rounds

3 Rounds

Grand Finale

Top 100

Prep Time

3–9 months

18 min read
2026 Pattern
For Freshers?

Challenging for freshers

Difficulty Level
Very Hard
Prep Time

3–9 months

Negative Marking

No

Last updated: August 2026
Report an error
Free DownloadNo credit card

Get the 1-Page HackWithInfy DSA Patterns Cheat Sheet — Free

Enter your email and we'll send it straight to your inbox.

  • Top 10 DP & Graph patterns that appear in Round 2
  • Greedy algorithm templates with time complexity notes
  • Sliding Window, Bitmask DP, and MST quick reference
  • Covers SP/PP track difficulty — Hard & Very Hard tiers

We'll also send you one follow-up email about our ₹79 bundle. That's it.

The 3-Round Structure

Each round is a separate elimination gate. You can exit with an offer after Round 1 (SP track) or go deeper for PP/Champion roles.

1

Round 1 — Online Assessment

~Sep/Oct
Duration:3 hours
Format:MCQs + 3 Coding Problems (Easy, Medium, Hard)
Platform:Infosys Recruitment Platform (online, proctored)
Key gate:Solving all 3 problems → Power Programmer track | 2/3 → SP track | 1/3 → DSE track
Languages:C, C++, Python, Java, JavaScript, TypeScript, Go
Key insight: MCQs are secondary weight. The 3 coding problems determine your track entirely. The Hard problem is where 80% of candidates drop off.
2

Round 2 — Advanced Online Round (IAP)

National Top 100
Duration:3 hours
Platform:Infosys Assessment Platform (IAP) — different from Round 1 platform
Focus:Greedy Algorithms + Dynamic Programming
Difficulty:Competitive programming — Codeforces Div. 2 C/D level
Output:Top 100 nationally advance to Grand Finale
Key insight: Brute-force solutions will not pass. Every problem requires optimal complexity — O(N log N) or better. Partial credit may be given for partial test case passes.
3

Round 3 — Grand Finale (On-campus, 4 Days)

Infosys HQ
Duration:4 days at Infosys campus (Mysuru or Bengaluru)
Format:Team hackathon (3–4 members) + individual technical interview on Day 4
Day 1:Problem briefing, team formation, planning & architecture design
Days 2–3:Active development — build a working, demo-ready system
Day 4:Live demo + one-on-one technical interview (code review, architecture, DSA)
Interview focus:Your code quality, trade-off decisions, DSA fundamentals, system design basics
Key insight: The Day 4 interview is a genuine technical deep-dive. Interviewers are senior Infosys engineers who will ask you to explain every design choice. Prepare to justify time complexity and architecture trade-offs.

Round 1 — Question Types & Approaches

These are the problem patterns that have appeared across multiple HackWithInfy editions. The problem names are real — "Oil Tank" and "General Ali's" are actual past problems. The Hard problems rotate but always require Graph or advanced DP.

1. Oil Tank Capacity (Array Simulation)

EasyLeetCode Easy

Given a sequence of fill and drain operations on an oil tank with a max capacity, simulate the state after each operation and return the final volume. Tests basic array traversal and boundary clamping (max/min).

Approach

Iterate the operations array. Maintain a running total. Clamp between 0 and capacity on each step. Time: O(N), Space: O(1).

ArraySimulationBoundary Conditions

2. Character Frequency Rearrangement

EasyLeetCode Easy–Medium

Rearrange characters of a string such that no two adjacent characters are the same. Return the rearranged string or "-1" if impossible.

Approach

Count frequencies with a HashMap. Use a max-heap (priority queue). Repeatedly extract the two most frequent characters and append alternately. Time: O(N log K), Space: O(K).

StringGreedyHeap

3. General Ali's Soldier Reduction

MediumLeetCode Medium

N soldiers stand in a row. In each round, all soldiers at even positions are eliminated. Count how many rounds until only 1 soldier remains. A variation tests which position survives given K rounds.

Approach

Observe the pattern: soldiers halve each round. Answer is ceil(log2(N)) rounds. For position survival, track which indices survive each halving. Time: O(log N).

MathBit ManipulationPattern

4. Balanced Bracket Sequence Count

MediumLeetCode Medium

Given a string with brackets and wildcard characters (*), count the number of ways wildcards can be replaced with (, ), or empty string to form a valid balanced sequence.

Approach

DP with (min_open, max_open) range tracking. For each character, update the valid open-bracket range. If max_open < 0 at any point, return 0. Final answer is valid if 0 is in [min, max]. Time: O(N).

StackDPGreedy

5. Graph Beauty Ranges

HardLeetCode Hard

Given a weighted graph, count pairs of nodes (u, v) where the shortest path length falls within a given range [L, R]. "Beauty" of a pair is defined by the path cost. Tests shortest path + range counting.

Approach

Run Dijkstra's from every source node. Collect all-pairs shortest paths. Use a sorted array + binary search to count pairs in [L, R]. Time: O(V * (E log V) + V² log V). Space: O(V²).

GraphDijkstraAll-Pairs Shortest PathBinary Search

6. Bitwise XOR Subset Amazement

HardLeetCode Hard / Competitive

Given an array of N integers, count the number of non-empty subsets whose XOR equals exactly K. For large N, a naive O(2^N) solution will TLE.

Approach

For small N (≤20): Bitmask enumeration O(2^N). For N>20: Meet-in-the-Middle — split array, enumerate XOR of all subsets of each half, then for each XOR value in the left half, binary search for K⊕left in the right half. Time: O(2^(N/2) * N).

Bitmask DPXORMeet in the Middle
Round 1 strategy: Spend the first 30 minutes on the Easy problem (aim for full score). Move to Medium (60 min). Spend the remaining 90 min on Hard — even a partial solution with 3–5 test cases passing is better than nothing. A partial solve on Hard combined with full Easy + Medium gets you into the SP track in most years.

Round 2 — Advanced Patterns (National Top 100 Gate)

Round 2 is where the SP track ends and the PP track begins. These patterns have appeared consistently. Every solution must be optimal — test cases are designed to TLE O(N²) and worse.

Interval Scheduling / Activity Selection

Hard

Select the maximum number of non-overlapping activities. Each activity has start and end time. Sort by end time and greedily pick. Extended variants: weighted job scheduling (DP + binary search).

Example:Given 10 meetings with start/end times, find the max meetings you can attend in one room.
Algorithm:Greedy + Sort
Complexity:O(N log N)
GreedyIntervalsSorting

Minimum Spanning Tree (Kruskal / Prim)

Hard

Connect all cities/nodes with minimum total edge weight. Kruskal's uses Union-Find + sort edges. Prim's uses a min-heap. HWI variants often pre-connect some nodes (use Union-Find to handle).

Example:N cities, M roads with costs. Some roads already built. Find minimum cost to connect all cities.
Algorithm:Kruskal's + Union-Find
Complexity:O(E log E)
GraphMSTUnion-FindGreedy

Longest Increasing Subsequence (LIS) Variants

Hard

Find LIS with constraints (max diff D between elements, K replacements allowed, etc.). Standard O(N²) DP TLEs — need O(N log N) patience sorting with binary search (lower_bound).

Example:Array [3,10,2,1,20]. LIS length = 3. Extended: LIS where adjacent diff ≤ 5.
Algorithm:DP + Binary Search
Complexity:O(N log N)
DPBinary SearchLIS

Digit DP

Hard

Count numbers in range [L, R] satisfying a digit-based condition (e.g., digit sum divisible by K, no two adjacent digits same, count of a specific digit ≤ M). State: (position, tight, carry/sum).

Example:Count integers from 1 to N where digit sum is divisible by 7.
Algorithm:Memoized DP with tight constraint
Complexity:O(digits × states)
DPDigit DPNumber Theory

DP on Trees

Hard

Problems where the state depends on subtree properties. Common: max independent set on tree, tree diameter, rerooting technique for "all-root" answers. Post-order DFS + memoization.

Example:Select maximum nodes from a tree such that no two selected nodes are adjacent (parent–child).
Algorithm:DFS + Post-order DP
Complexity:O(N)
TreeDPDFSRerooting

Bitmask DP (Subset/Assignment)

Hard

Assign N tasks to M workers (N, M ≤ 20) minimising cost. State: bitmask of assigned tasks. Transition: try assigning next task to next worker. Also used in TSP variants.

Example:Assign 5 jobs to 5 workers minimising total cost (each worker does exactly 1 job).
Algorithm:Bitmask DP
Complexity:O(2^N × N)
Bitmask DPAssignmentOptimization
Round 2 strategy: You need to fully solve 2 of 3 problems to reliably make the Top 100. Partial solutions (partial test case passes) are acknowledged — attempt all problems. If stuck, optimise brute force: reduce O(N³) → O(N²) first, then try for O(N log N). Greedy problems are usually more tractable than DP problems under time pressure.

Role Tracks — CTC, Requirements & Realistic Prep Time

Pick your target track before you start preparing. The SP track and PP/Champion track require completely different preparation intensity.

RoleCTCHow to get itPrep (months)LeetCode target
Systems Engineer (SE)₹3.6–4.0 LPAInfosys NQT (not HWI)1–2 monthsLeetCode Easy (50 problems)
Digital Specialist Engineer (DSE)₹6.25 LPAHWI Round 1 — partial solve2–3 monthsLeetCode Easy–Medium (100 problems)
Specialist Programmer (SP)₹9.5–11.0 LPAHWI Round 1 — solve all 33–5 monthsLeetCode Medium–Hard (150+ problems)
Power Programmer (PP)₹10.0–12.0 LPAHWI Round 2 / Round 36–8 monthsCodeforces 1200+ / LeetCode 200+ Hard
SP Level 1 / Level 2₹16.0–21.0 LPAGrand Finale Champion8–9 monthsCodeforces Specialist 1400+ / LeetCode Knight 1800+

Grand Finale Prep — What to Expect in 4 Days

Most guides stop at Round 2. This is what the Grand Finale actually looks like — from someone who has been there.

Day 1

Problem Briefing + Architecture Planning

  • You receive a real-world engineering problem (past themes: recommendation engine, logistics optimizer, fraud detection system)
  • Teams of 3–4 are self-formed or assigned by Infosys
  • Key output: a system design document — ERD, API contracts, component diagram
  • Judges evaluate planning quality. A solid Day 1 doc prevents scope creep on Day 3.
Days 2–3

Active Development

  • Build the system end-to-end — backend, APIs, basic frontend, and data layer
  • Code quality matters: judges review your GitHub commit history and code structure
  • Common mistakes: over-engineering the frontend, ignoring edge cases in core logic, not writing unit tests
  • Tip: deploy something working by end of Day 2. Day 3 is for polishing and handling edge cases.
Day 4

Demo + One-on-One Technical Interview

  • 10-minute live demo of your working system to a panel of 3–4 senior engineers
  • Followed by 30-minute one-on-one technical interview
  • Interview covers: explain your architecture, why you chose this DB, time complexity of your core algorithm, what you would change with more time
  • DSA questions: typically medium-hard LeetCode in the topic area your system uses (e.g., graph problems if you built a routing system)
  • Behavioral: leadership during the hackathon, how conflicts were resolved, biggest technical blocker

Preparation Roadmap by Track

SP Track — 3–5 Months
Target: ₹9.5–11 LPA
Month 1Arrays, Strings, Basic Recursion — solve 60 LeetCode Easy
Month 2Linked Lists, Stacks, Queues, Hash Maps — 40 LeetCode Easy–Medium
Month 3Trees (BST, traversals), Basic Graphs (BFS/DFS) — 40 LeetCode Medium
Month 4DP basics (0/1 Knapsack, LCS, LIS), Greedy — 30 LeetCode Medium
Month 5Sliding Window, Two Pointers, Bit Manipulation — mock rounds on HWI-style problems
PP / Champion Track — 8–9 Months
Target: ₹12–21 LPA
M 1–3All SP track content + 150+ LeetCode Easy–Medium
M 4–5Advanced DP: Bitmask, Digit DP, DP on Trees — 60 LeetCode Hard
M 6Advanced Graphs: Dijkstra, Bellman-Ford, Segment Trees
M 7–8Codeforces Div. 2 A–D problems, weekly contests — target rating 1200+
M 9Full mock hackathons (48hr), system design basics, interview prep

System Requirements & Integrity Rules

Hardware

i3 Core or higher processor
4GB RAM minimum
Functional webcam (no exceptions)
Stable Internet: 2 Mbps down / 1 Mbps up

Software

Google Chrome 70+ (keep updated)
Pop-up blocker disabled
Run pre-check: rec-test.infosys.com/precheck
Supported: C, C++, Python, Java, JS, TypeScript, Go
Disqualification triggers
No calculators, headphones, or earphones
No Skype, Teams, or external apps open
No other persons in the room
Webcam must show full, clear face at all times
No tab switching away from test screen
Login within first 15 minutes of slot window — missing = forfeit

Frequently Asked Questions — HackWithInfy 2026

🚀

Master the HackWithInfy 2026 Pattern

Every DP pattern, every Graph algorithm, every Round 2 template — in one bundle.

Get the Complete 22 PDF Prep Bundle — ₹79

SP/PP/Champion tracks · Round 1 & 2 patterns · Grand Finale prep · 22 curated PDFs

🛠️

Practice Now — Free Tools for Infosys HackWithInfy

HackWithInfy is a pure coding challenge. Strengthen your DSA patterns and speed.

🏢

Related Company Prep Guides

Preparing for multiple companies? These guides cover the full 2025–26 placement season.

Also check out our Aptitude Simulator and Placement Roadmap for a complete prep plan.

View all company roadmaps