Specialist Programmer
Specialist Programmer
TEST FORMAT
Test will contain 3 questions that will have to be solved in 3 hours
Test will have sectional cut-off as well as total cut-off
Each question will belong to a different difficulty level:
Easy – Simple questions that can be solved by basic application of aptitude
and all the test cases should pass (Greedy Algorithms)
Medium – Usually a question based on Dynamic Programming
Hard – Usually a question based on Dynamic Programming
Code can be written for each question using one of the programming
languages from C/C++/C#/Java/Python/JavaScript
1
INFOSYS ONLINE TEST – HOW TO PREPARE
DIFFICULTY OF QUESTION - EASY
A Greedy algorithm is any algorithm that follows the problem-solving
heuristic of making the locally optimal choice at each stage
2
INFOSYS ONLINE TEST – HOW TO PREPARE
DIFFICULTY OF QUESTION - HARD
Dynamic Programming (DP) is an algorithmic technique for solving an
optimization problem by breaking it down into simpler subproblems and
utilizing the fact that the optimal solution to the overall problem depends
upon the optimal solution to its subproblems.
3
INFOSYS ONLINE TEST – HOW TO PREPARE
DIFFICULTY OF QUESTION - HARD
Characteristics of a Dynamic Programming problem
Following are the two main properties of a problem that suggest the given
problem can be solved using Dynamic Programming:
1. Overlapping subproblems
A problem has overlapping sub-problems if its solution involves solving the
same subproblem multiple times.
2. Optimal substructure properties
The overall optimal solution can be constructed from the optimal solutions
of its subproblems.
4
INFOSYS ONLINE TEST – HOW TO PREPARE
DIFFICULTY OF QUESTION - HARD
Dynamic Programming methods
There are two different ways to store values for an overlapping
subproblem so that the values can be reused:
1. Top-down with Memorization
To solve a bigger problem, in this approach we recursively find the solution
to the smaller sub-problems and its result is cached. So next time the same
sub-problem is tried to solve, the cached memorized result is returned.
2. Bottom-up with Tabulation
In this approach, we solve the problem “bottoms-up” i.e., by filling up an
n-dimensional table. Based on the results in the table, the solution to the
top/original problem is then computed.
5
INFOSYS ONLINE TEST – HOW TO PREPARE
DIFFICULTY OF QUESTION - HARD
Some examples of Dynamic Programming
• Knapsack problem
• Fibonacci Numbers
• Palindromic Subsequence
• Longest Common Substring
• Dijkstra's algorithm
6
INFOSYS ONLINE TEST – HOW TO PREPARE
DIFFICULTY OF QUESTION - HARD
7
INFOSYS VIRTUAL INTERVIEW
This round will access your technical and behavioral skills.
STRUCTURE
Total duration will be around 1 hour
4. At the end of each session, we will share f the problem statement which
students can solve on platform.
5. Student can practice other problems also of similar topics and come
with questions or mail the questions before the session.
6. It is advisable that student spend at least 2hrs a day, every day to brush
up and prepare.
9
Data Structures
•Array, Linkedlist, Dictionary (Map), Queue, Stack, Sets
and other basic data structures
•Segment tree
•Fenwick tree (or suffix array)
•Red-Black tree
•Radix tree
•KD tree
•B, B+ tree
•Any other on similar lines
10
A DP problems
• Backtracking
• Bit-mask
• Hashing
• Lazy propagation
• Prefix sum
• Experimental
• Sum over subsets
• MO's algorithm
• Graph theory
• Graph families e.g., Bi-partite, flow networks
• Any other on similar lines
11