Introduction📑
HackWithInfy is a programming contest open to students in their second to the pre-final year in India. Participants in this competition must answer coding questions within a set time limit, and the top finishers will be invited to an Infosys interview. The program is specifically created to foster an early culture of quick problem-solving and creative thinking.

This article will discuss everything related about HackWithInfy, the benefits of this coding contest, the eligibility criteria, the test pattern, the syllabus, and how to prepare for the same. So let’s get started.
Benefits of HackWithInfy💰
🧣Prize money of INR 200000, INR 100000, and INR 50000 will be awarded to the top achievers.
🧣The company will provide full-time employment and internship chances to successful individuals.
🧣A power programmer would make about 8,32,198/- per annum.
🧣The annual salary for a digital system engineer would be about 6,32,198/- per annum.
🧣The annual salary for a System Engineer Specialist would be around 5,19,198/- per annum.
Eligibility Criteria✅
- The participant must be an Indian resident and must be 18 years of age or older on the day they enter or register. The event is voluntary and open to all.
- Participants must graduate in 2023, 2024, or 2025 with a B.E., B. Tech, M.E., or M. Tech degree. If there is any doubt regarding a participant's eligibility, the Company reserves the right to request verification of that eligibility.
- By participating in the Contest, Participants are believed to have accepted these terms and conditions.
- Participants should not have any active backlogs.
Test Pattern✍️

There will be two rounds that you should know about HackWithInfy:
🔰Round 1: Individual online participation on the Infosys Assessment Platform. This round will be hosted on the Infosys Assessment Platform (IAP).
🔰Round 2: The Grand Finale and the 48-hour hackathon between teams.
The four-day grand finale will feature the top 100 competitors from Round 1. The finalists will also have the chance to participate in Infosys's specialized technical internship programs and pre-placement interviews.
You can also have a look at the Past Round Insights for HWI to have a better understanding of the same.
NOTE👀 Participants in Round 1 must sign up as individuals and finish the challenge within the allotted time. Participation in Round 2 will be on a team basis, as determined by the Company, entirely at its discretion.
Hiring Process🖥️
You will be offered opportunities on various profiles based on how well you perform in the online test and the interview.
📚System Engineer Specialist: Who answered one or two rounds of questions correctly and had an average interview. For reference, you can check out this Infosys Interview Experience to upskill your preparation.
📚Digital System Engineer: Who completed two questions in Round 1 and had a successful interview.
📚Power Programmer: Who answered two or three questions in Round 1 and had an excellent interview.
Additionally, based on the interview, you will be able to become a System Engineer. If the interview process went poorly, you would be given 2-3 chances for various roles.
NOTE👀 Only the top 100 candidates will receive invitations to the power programming interviews.
Difficulty Level of HackWithInfy🤯

If your ranking is in the top 100 in Round 2, you will have the opportunity to participate in a 48-hour hackathon at a location specified by Infosys. The paper has a very high level of difficulty. Additionally, Infosys will bear all the finalists' travel and lodging expenses.
Syllabus📜
You have three hours to answer the three questions in the first round. There is no pre-defined syllabus for HackWithInfy, but the following coding round questions are frequently asked:
- Dynamic Programming
- Greedy Algorithms
- Backtracking
- Stack
- Queue
- Mapping Concepts
- Array manipulation
- String manipulation
- HarshMap
- Tree
- Graph
- Bit Mapping and Hashing
- Recursion and Heap
- Divide and Conquer
If you qualify in the top 100 in Round 2, you will be allowed to participate in a 48-hour hackathon at a venue chosen by Infosys. However, the paper has a very high level of difficulty.
How to Prepare for HackWithInfy🎯

The points you should remember if you want to know How to Prepare for HackWithInfy are listed below.
🚀Excellent Programming Language Skills
To know all the tricks, you should have a firm grasp of your programming language. The language you are most at ease with should always be your choice. However, using the programming languages C, C++, or Python is advisable.
🚀Select a Platform for Practice
To improve your skills, you must select a platform where you may practice frequently. You can visit our website to practice coding problems.
🚀Be Incredibly Quick in Typing Code
If your code fails, you should have enough time to find a new solution. To save time, you will need to type the code quickly because you can save additional time by checking, resolving, and retyping as you go.
🚀Practice to Sharpen Your Skills
You must practice, practice, and practice more to improve your problem-solving abilities since the more you do it, the less anxious you will be to take the exam.
🚀Solve Previous Year Questions
You should attempt to answer HackWithInfy's previous year's questions. You will gain insight into the type and difficulty of questions in the paper.
Sample Questions🧑💻
Now that you’ve understood the benefits of this exam, the eligibility criteria, and the strategies to prepare for HackWithInfy, it’s time to take your preparation one level up by practicing these questions.
Problem Statement 1💡
There are three stone piles. The first pile of stones consists of stones, the second pile consists of b stones, and the third consists of c stones. You must pick one of the piles and distribute the stones to the other two piles. To be more precise, if the chosen pile originally contained s stones, you must select an integer k (0≤k≤s), transfer k stones from the chosen pile to one of the other two piles, and add s-k stones to the other pile. After doing this, check if the two remaining piles can contain x and y stones, respectively, in any sequence.
INPUT FORMAT
- A single integer T denoting the number of test cases appears on the first line of the input.
- Each test case starts with a single line that contains five integers separated by spaces
a, b, c, x, y
OUTPUT FORMAT
For each test scenario, print a single line with the string "YES" if acquiring piles of the specified sizes is possible or "NO" if it is not.
CONSTRAINTS
1 <= T <= 100
1 <= a,b,c,x,y <= 10^9
Sample Input |
Sample Output |
4 (Number of Test Cases) |
|
1 2 3 2 4 |
YES |
3 2 5 6 5 |
NO |
2 4 2 6 2 |
YES |
6 5 2 12 1 |
NO |
Test case 1: You can remove the two stones from the second pile and place one of them on the first pile and the other stone on the third pile.
Test case 2: You don't have enough stones.
Test case 3: You can pick the first pile and transfer all of its stones to the second pile.
C++
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main ()
{
int t;
cin >> t;
while (t--)
{
int a, b, c, x, y;
cin >> a >> b >> c >> x >> y;
if ((a + b + c) != (x + y))
{
cout << "NO" << endl;
}
else
{
if (y < min (a, min (b, c)) || x < min (a, min (b, c)))
{
cout << "NO" << endl;
}
else
{
cout << "YES" << endl;
}
}
}
Python
#Test case
t=int(input())
# loop for each test case
for tc in range(t):
# int inputs in single line
a,b,c,x,y = [ int(x) for x in input().split() ]
if (a+b+c) != (x+y):
print(“NO”)
elif y< min (a, min(b,c)) or x<min(a,min(b,c)):
print(“NO”)
else:
print(“YES”)
Problem Statement 2💡
Aman has recently learned about number bases and has become captivated. Aman discovered that new digit symbols must be added for bases bigger than ten and that utilizing the first few letters of the English alphabet is conventional. For instance, the digits in base 16 are 0123456789ABCDEF. Since the English alphabet only includes 26 letters, this scheme can only be used up to a base of 36, in Aman's opinion. Aman, however, has no trouble with this because he is incredibly inventive and can easily create new numerical symbols as needed.
Aman also observed that all positive integers in base two begin with the number 1! However, this is the only base where it is true. Thus, Aman naturally asks: Given an integer N, how many bases b exist such that N is represented by base-b so that base-b begins with a 1?
INPUT FORMAT
The first line of the input consists of an integer T denoting the number of test cases. The description of T test cases follows.
Each test case contains one line containing a single integer N (in base ten).
OUTPUT FORMAT
For each test scenario, output a single line containing either "INFINITY" or the number of bases b.
CONSTRAINTS
1 <= T <= 10^5
0 <= N < 10^12
Sample Input |
Sample Output |
4 (Number of Test Cases) |
|
6 |
4 |
9 |
7 |
11 |
8 |
24 |
14 |
C++
#include<bits/stdc++.h>
using namespace std;
vector<long long int>v[47];
int main()
{
long long int i,j;
for(i=2;i<=(int)1e6;i++)
{
long long int tem=i;
for(j=2;j<=40;j++)
{
tem=tem*i;
if(tem>(long long int)1e12)
break;
v[j].push_back(tem);
}
}
int t;
scanf("%d",&t);
while(t--)
{
long long int m;
scanf("%lld",&m);
if(m==1)
{
printf("INFINITY\n");
continue;
}
long long int ans=(m+1)/2;
long long int p=m/2+1;
for(i=2;i<=40;i++)
ans=ans+(lower_bound(v[i].begin(),v[i].end(),m+1)-lower_bound(v[i].begin(),v[i].end(),p));
printf("%lld\n",ans);
}
return 0;
}
Check out these mock test series curated to enhance your coding skills and boost your preparation for HackWithInfy.
Check out Infosys Interview Experience to learn about their hiring process.
Resources🔥
We hope that now you are all set to ace the HackWithInfy contest. But, if you still have any further doubts or want to know more about the contest, then here are some resources to aid your preparation journey:
Don’t forget to watch this video before you start your preparation for the HackWithInfy contest.
If you want to know more about the opportunities offered by Infosys, then check out these links:
Prepare for Infosys Interview Questions
Frequently Asked Questions
What are the guidelines for HackWithInfy?
The entire duration of the test will be web-proctored, and the video will remain on for the whole duration of the test. So must remember to follow these steps:
- Dress properly.
- Do not use headphones, earphones or any other audio device.
- You should be sitting in a quiet environment.
- You must remain in the video frame for the whole time.
What type of questions are asked in HackWithInfy?
HackWithInfy questions cover all types of computer science topics like data structure, web development, mobile app development, AI/ML and all programming algorithms. The questions can be asked in the form of multiple-choice coding challenges with different levels of difficulty.
What is the difficulty of HackWithInfy?
The difficulty level of HackWithInfy varies, but it is usually regarded as difficult for participants. Questions range from simple to complex, demanding strong problem-solving abilities as well as knowledge of computer science and programming concepts.
Can we write code in any language in HackWithInfy?
Yes, participants may create code in popular programming languages such as Java, Python, C++, and others as per their choice. The competition guidelines will include a specific set of allowed languages.
What is the advantage of HackWithInfy?
HackWithInfy offers several advantages to participants, including the opportunity to showcase their coding skills and creativity, gain exposure to real-world problems and cutting-edge technologies, network with industry professionals, and potentially win prizes, internships, or job offers from Infosys.
Conclusion
For students looking to explore their programming interests and compete with a chance to work for Infosys, HackWithInfy is the ideal stepping stone. This article has extensively discussed everything you need to know about HackWithInfy.
To learn more about Infosys, check out our articles on
- UI developer at Infosys
- Test Engineer at Infosys
- AWS DevOps Engineer at Infosys
- Job Opportunities at Infosys
- Ways to join Infosys
- About InfyTQ
- Ways to join Infosys
- Crack Infosys in a week
- Specialist Programmer at Infosys
- System Engineer at Infosys
Visit our website Coding Ninjas Studio to read more interesting blogs and upskill yourself in Android Development, Coding Ninjas Studio Problems, Coding Ninjas Studio Interview Bundle, Coding Ninjas Studio Interview Experiences, Coding Ninjas Courses, Coding Ninjas Studio Contests, and Coding Ninjas Studio Test Series.
You may consider our paid courses to give your career an edge over others!
Do upvote our blogs if you find them helpful and engaging!
Happy Learning, ninjas!
