Times Internet interview experience Real time questions & tips from candidates to crack your interview

Software Developer

Times Internet
upvote
share-icon
4 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Confidence, Communication, Puzzle Solving Capability, Algorithms And Data Structures, Basic C/C++
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date7 Dec 2015
Coding problem2

The test was of moderate level, the coding question was easy if all the boundary questions were properly considered.

1. Largest Prime Factor

Easy
15m average time
85% success
0/40
Asked in companies
IntuitBarclaysPolicyBazaar.com

You are given a positive integer ‘n’. Your task is to find the largest prime factor of this given positive integer.

Note :
If there is no prime factor of a given integer, then print -1.
Problem approach

The direct approach is to traverse all elements of the array one by one. Initialise two variables max and second_max. For every element, check whether it is prime or not. If it is prime, update max and second_max accordingly. At the end, return the value stored in second_max variable.

The efficient approach would be to generate all primes upto maximum element of the array using sieve of Eratosthenes and store them in a hash. Now traverse the array and find the second maximum element which is prime using the hash table.
Time Complexity : O(n*log(log(n))

Try solving now

2. First Missing Positive

Moderate
18m average time
84% success
0/80
Asked in companies
DunzoHikeSamsung

You are given an array 'ARR' of integers of length N. Your task is to find the first missing positive integer in linear time and constant space. In other words, find the lowest positive integer that does not exist in the array. The array can have negative numbers as well.

For example, the input [3, 4, -1, 1] should give output 2 because it is the smallest positive number that is missing in the input array.

Problem approach

Hashing can be used to solve this problem. Build a hash table of all positive elements in the given array. Now, traverse the hash table for all positive integers starting from 1. As soon as a number is found that is not present in the hash table, return that number. 
Time Complexity : O(N) on average 
Auxiliary Space : O(N)

This problem can also be solved in O(1) space by using the given array as hash table. Use the array elements as index. To mark presence of an element x, Change the value at the index x to negative. 
Steps:
1) Segregate positive numbers from others i.e., move all non-positive numbers to left side. 
2) Now, consider only the part of array which contains all positive elements. Traverse the array containing all positive numbers. 
For element x, mark its presence by changing the sign of value at index x to negative. 
3)Now,Traverse the array again and print the first index which has positive value.

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date9 Dec 2015
Coding problem4

The interviewer was friendly and he was interested in the implementation first and then the code.
Tips: Be thorough with various implementations and why they are in practice. Try to know the logic behind each implementation.

1. Binary Array Sorting

Easy
20m average time
85% success
0/40
Asked in companies
OptumAthenahealthPolicyBazaar.com

A binary array is an array consisting of only 0s and 1s.

You are given a binary array "arr" of size ‘N’. Your task is to sort the given array and return this array after sorting.

Problem approach

A two-pointer approach can be used for this question. Maintain two indexes. Initialize the first index left as 0 and second index right as n-1, where n is size of the array .
While left < right , do the following : 
a) Keep incrementing index left while arr[left] =0 
b) Keep decrementing index right while arr[right]=1 
c) If left < right then exchange arr[left] and arr[right]

Try solving now

2. OOPS Question

What is Polymorphism?

Problem approach

Polymorphism is of two types :
1. Compile Time Polymorphism : 
Invokes the overloaded functions by matching the number and type of arguments. The information is present during compile-time. This means the C++ compiler will select the right function at compile time. It is achieved through function overloading and operator overloading.
2. Run Time Polymorphism : 
This happens when an object’s method is called during runtime rather than during compile time. Runtime polymorphism is achieved through function overriding. The function to be called is established during runtime.

3. OOPS Question

What is operator overloading?

Problem approach

To overload an operator, we use a special operator function. We define the function inside the class or structure whose objects/variables we want the overloaded operator to work with.

Program overloading << operator :

#include
#include
class Time
{
int hr, min, sec;
public:
// default constructor
Time()
{
hr=0, min=0; sec=0;
}

// overloaded constructor
Time(int h, int m, int s)
{
hr=h, min=m; sec=s;
}

// overloading '<<' operator
friend ostream& operator << (ostream &out, Time &tm); 
};

// define the overloaded function
ostream& operator << (ostream &out, Time &tm)
{
out << "Time is: " << tm.hr << " hour : " << tm.min << " min : " << tm.sec << " sec";
return out;
}

int main()
{
Time tm(3,15,45);
cout << tm;
return 0;
}

4. OOPS Question

Differentiate between method overloading and method overriding

Problem approach

1) Method overloading is used to increase the readability of the program. Method overriding is used to provide the specific implementation of the method that is already provided by its super class.
2)Method overloading is performed within class. Method overriding occurs in two classes that have IS-A (inheritance) relationship.
3) In case of method overloading, parameter must be different. In case of method overriding, parameter must be same.
4) Method overloading is the example of compile time polymorphism. Method overriding is the example of run time polymorphism.

03
Round
Easy
Face to Face
Duration45 minutes
Interview date9 Dec 2015
Coding problem3

The interviewer was looking for a person interested in problem solving. He was looking forward for loud thinking.
Tips: If you don't know any answer, don't lose your cool. It is never necessary to answer all the questions in an interview. Be confident and think loud, so that if you are going the wrong way, the interviewer can assist you.

1. Puzzle

If a person travels from point A to point B at 20 km/h and returns at 30 km/h, calculate the average speed without using pen and paper.

Problem approach

Average Speed = Total Distance/ Total Time

Distance = Speed x Time

Let’s say the Distance between A and B is x
Time(A-B) = x/20 kmph = x/20 hr
Time(B-A) = x/30 kmph = x/30 hr
Total Time = (50/600)x hr
Total Distance = 2x
Average Speed = (2x)/[(50/600)(x)] =1200/50 kmph = 24 kmph

2. Puzzle

There are 20 red balls and 16 blue balls in a bag. Any 2 balls are removed at each step and are replaced with a new ball on the basis of the following conditions:
If they are of the same color, then they are replaced by a red ball.
If they are of different colors, then they are replaced with a blue ball.
Find the last ball to remain after the entire process.

Problem approach

Blue balls can only be reduced by two and that too if the 1st condition is satisfied, i.e., if you choose both blue balls, then they are replaced by a single red ball. In no other ways you can reduce blue balls. Red balls can be reduced by one on the basis of 2nd condition if you choose both different balls and on the basis of 1st condition if you choose both red balls.
Now, because there are an even number of blue balls and blue balls can only be reduced by two, you will end up with either 0 or 2 or 4...(even number) blue balls in the bag at any point during the replacement process. There will never be a situation in which the bag contains an odd number of blue balls. As a result, the last ball in the bag will be a red ball in any combination of replacements.

3. Puzzle

You are provided with 8 identical balls and a measuring instrument. 7 of the eight balls are equal in weight and one of the eight given balls is defective and weighs heavier. The task is to find the defective ball in exactly two measurements.

04
Round
Easy
HR Round
Duration30 minutes
Interview date9 Dec 2015
Coding problem1

This was the last round and just for formality. The interviewers were looking for a person who would fit in their working culture.
Tips: Be confident and always have a smile on your face. If you are selected for the HR interview, then there is a 90% chance that you would be selected.

1. Basic HR Questions

Q1. Do you have any question for us?
Q2. Questions based on my resume
Q3. What do i know about Times Internet and the work that happens in TIL
Q4. Why was i opting for a job as software developer though i was from Civil Engineering background

Problem approach

Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - 1
1 rounds | 5 problems
Interviewed by Times Internet
1130 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
Software Developer
4 rounds | 6 problems
Interviewed by Times Internet
1009 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Developer
5 rounds | 14 problems
Interviewed by Microsoft
3931 views
1 comments
0 upvotes
company logo
Software Developer
6 rounds | 12 problems
Interviewed by SAP Labs
2806 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 3 problems
Interviewed by Amazon
1133 views
0 comments
0 upvotes