Back to Tracks
🚀 Infosys Track•14 Questions Total

Hack With Infy Zero to Hero Practice Roadmap

A structured practice roadmap. Solve foundational logic, algorithms, math, graph, and tree problems from Hack With Infy.

Your Progress:0 / 14 Solved

Keep going! Master these to reach hero status.

1

Hack With Infy - Easy(1-5)

Easy level problems from Hack With Infy.

5 / 5 Questions Ready
#1

Array Queries

Active

You are given an array `A` of `N` integers and `Q` queries. There are two types of queries: 1. `(1, L, R)`: Replace `A[i]` with `(i-L+1) * A[L]` for all `L <= i <= R`. 2. `(2, L, R)`: Calculate the sum of elements in `A` from index `L` to `R` inclusive. Return the sum of the answers of all queries of type 2 modulo `10^9 + 7`. **Constraints:** - `1 <= N, Q <= 10^5` - `1 <= A[i] <= 10^9`

#2

Good Subarray

Active

Given an array `A` of length `N` and an integer `K`. A subarray is considered **good** if the number of distinct elements doesn't exceed `K`. An empty subarray is also good and its sum is `0`. Find the maximum sum of a good subarray. **Constraints:** - `1 <= N <= 10^5` - `1 <= K <= N` - `-10^9 <= A[i] <= 10^9`

#3

Oil Tank

Active

There is a tank with capacity `C` and `N` people arriving sequentially. If `A[i] = 1`, the person sells 1L. If `A[i] = -1`, the person buys 1L. If the tank overflows or underflows, it causes 1 'disturbance'. Minimize the total number of disturbances by choosing the optimal initial oil amount `X` (`0 <= X <= C`). **Constraints:** - `1 <= N <= 10^5` - `1 <= C <= 10^5`

#4

General Ali Strategic Game

Active

Reduce `N` soldiers to `1` in minimum moves. Moves available: 1. Reduce by 1. 2. Reduce by half (rounding down). 3. Reduce by two-thirds (rounding down). The resulting number of soldiers must always be an integer > 0. **Constraints:** - `1 <= N <= 10^18`

#5

Enemy Grid

Active

`N x M` grid. `*` is block, `A` is invaded, `E` is enemy. At each second, any `E` adjacent to `A` gets invaded and becomes `A`. Find minimum time to invade all `E`s, or `-1` if impossible. **Constraints:** - `1 <= N, M <= 1000`

2

Hack With Infy - Medium(6-10)

Medium level problems from Hack With Infy.

5 / 5 Questions Ready
#6

Infosys Hard Q6

Active

Problem description for Q6. Solve this problem efficiently within the time limits.

#7

Infosys Hard Q7

Active

Problem description for Q7. Solve this problem efficiently within the time limits.

#8

Infosys Hard Q8

Active

Problem description for Q8. Solve this problem efficiently within the time limits.

#9

Infosys Hard Q9

Active

Problem description for Q9. Solve this problem efficiently within the time limits.

#10

Infosys Hard Q10

Active

Problem description for Q10. Solve this problem efficiently within the time limits.

3

Hack With Infy - Hard(11-14)

Hard level problems from Hack With Infy.

4 / 4 Questions Ready
#11

Infosys Hard Q11

Active

Problem description for Q11. Solve this problem efficiently within the time limits.

#12

Infosys Hard Q12

Active

Problem description for Q12. Solve this problem efficiently within the time limits.

#13

Infosys Hard Q13

Active

Problem description for Q13. Solve this problem efficiently within the time limits.

#14

Infosys Hard Q14

Active

Problem description for Q14. Solve this problem efficiently within the time limits.