Anna University

Chennai, Tamil Nadu

Your seniors at Anna University were your true well-wishers, they shared their placement interview questions for you. 🙏

filter iconFilter interviews by

Anna University Placement Interview Questions

Updated 3 Jan 2025

139 interviews found

5 Interview Rounds

Interview Preparation Tips

Round: Test
Experience:     Two questions were asked in the written test. It was basically a coding round.
     1) 
                                                                         1
                                                                    /            \
                                                                 2                 3
                                                            /        \           /        \
                                                          4          5       6         7
                                   Output : 1,2 3,7,6,5,4
    2) Given a binary tree, check whether  a given sum ‘x’ is present along any path from the 
root to any of the leaves. 
              1
                                                                    /            \
                                                                 4                 3
                                                            /        \           /        \
                                                          9          5       6         7
                     if x = 14 , answer is true  because 1+4+9 = 14
                     if x =  12, answer is false

Round: Other Interview
Experience: The initial interview was known to be Data Structures and algorithms round. The two 
interviewers totally asked me questions on data structures and mostly concentrated on how 
much I knew about time and space complexities.
a) The first question was to find the vertical column sum of every column in a given 
binary tree and return the result in an array from left to right.
The first solution which I told is by finding the leftmost and rightmost index of the array , 
thereby finding the index for the root. Following to this step, the sum can be stored easily while 
traversing from top to bottom and saving the value at index­1 while moving to the left and at 
index + 1 while moving to the left. This solution used two tree traversals. 
 He was good with this solution but asked to optimise with respect to time. Then, i 
shooted out the solution using a doubly linked list where we can traverse to and fro and store all 
the sum values. While using linked list, instead of index ­1 & index + 1 , prev and next pointers 
can be used to access the next and prev location from the current location. This way , the 
solution is optimized with time.
b) The second question was that I have been given a binary tree where the node 
structure would be something like below :
 struct tree
{
       struct tree * left, *right, *sib ;

Now , the task was to point every sib pointer to its nearest rightmost node in the same level. i.e 
the sib pointer of the rightmost node at every level would be NULL.
The first solution which I told them was to perform a Breadth first search and by using a 
queue would connect all the nodes of a level at a time. But, this would increase the space 
complexity and of course I was asked to optimize the solution.
       Given tree :
                                                                  root ­­­>  1
                                                                             /         \
                                                                         2               3
                                                                     /         \              \
                                                                    4       5                 7
     The result should be :
                                          root ­­­>  1
                                                                             /         \
                                                                         2   ­­­­­­>  3
                                                                     /         \              \
                                                                    4 ­­­­­> 5­­­­­­­­>7
  Let me explain the solution which I gave them for the above example. 
          Starting from 1, for any node connect the sib pointer of left node to its right node if both 
are present or if both are not null. If the left node is not present then no need to perform this 
operation but if the right node is alone present, then there may be another possibility for the 
presence of some other nodes at the same level. Here ,  2 will point to 3 as explained above. In 
the same way 4 will connect to 5 . But , we come to know that in the second  level there is one 
more node 3 and it has a child 7 . So , 5 is connected to 3’s right child. In the same way the 
other nodes would be connected. By this approach, we can understand that before pursuing 
towards any level, all the sib pointers in the previous level are connected. This solution would 
work for all the test cases. 
c) Given two arrays of integers , find the intersection of both arrays. I was asked to give 
various solutions and sort the solutions with respect to time complexitiy.
d) Given a binary search tree with positive integers and a number ‘X’ find the next 
greatest number to X from the BST. If the number is not present, return ­1.

Round: Other Interview
Experience:  and code for it on paper. The two problems were based on data structures.
a) Given a binary tree, find the ancestor matrix where time complexity was considered 
but not much than the written code.
Given tree :
                                                                  root ­­­>  1
                                                                             /         \
                                                                         2               3
                                                                     /         \              \
                                                                    4       5                 6
The ancestor matrix is shown as 
     1   2   3   4   5   6  
1   0   1   1   1   1   1   
2   0   0   0   1   1   0
3   0   0   0   0   0   1
4   0   0   0   0   0   0
5   0   0   0   0   0   0
6   0   0   0   0   0   0
Let the above matrix would m[][]  such that m[i][j] = 1 , where i is the ancestor of j.
b) The second question was to swap every consecutive two nodes in a singly linked list.
         For example given a list 1­2­3­4­5­6­7­null
         The result must be      2­1­4­3­6­5­7­ null
For the above both questions , the interviewer saw the code and reviewed it with 
different test cases to get satisfied.                              


Round: Hr cum technical
Experience: This was a HR cum technical round, but most of the questions were straight forward. 
The two managers who interviewed me were testing my managerial skillls. Lot of questions 
arised and the interview went for more than a hour. Few questions were like :
a) What do you know about Amazon ?
b) Why I preferred Amazon.com to my previous offer ?
c) The responsibilites which I undertook during my college days with brief explanations 
on every responsible task which I did !!
d) Any projects which I did apart from academics ?? I explained about my android 
project which I did with my elder brother.
At the end the round ended with a simple technical question =>
      I was asked to design a stack using a c++ class such that it can perform the following 
functions which will be called by different APIs :
            ­ Create a stack of size ‘n’
­ Push an element into the stack
­ Pop an element from the stack
­ Destroy the stack 
     At the end of this round, I asked about their experiences at Amazon.com and about my 
work/role at amazon in future.

Round: Technical Interview
Experience: Coming to the fourth round, it was totally technical. Technical here covers theortical topic 
from the fields of Operating systems, OOPS and Networks. The questions which were asked 
were :
a) What is the difference between physical address and virtual address ?
b) What is page table and paging ?
c) What is the difference between thread and process ?
d) What is context switch and how it differs between process and threads ?
e) What are threads and why are threads preferred to process ?
f) What are semaphores and differnce between semaphores and locks ??
g) What are the 7 OSI layers in networks and their functionalities ?? He mostly asked 
about transport and network layers.
h) What is encapsulation ?
i) What is polymorphism and their types ??
j) What is differnce between polymorphism and function overloading ??
k) The last question was to design / implement a singleton class .
Here this round ended, but I made many sothapals without sufficient preparation :P
Interview No ­5
 This interview was also HR cum technical round but it was known as a bar raiser round. 
I am not sure how to spell it too. The questions were almost the same as in the 3rd interview 
with additional questions like  “ how did you react in conflicting situations in four year career ? “.
This round also ended with technical questions :
a) Given a doubly linked list where the next pointer is pointed to the next node in 
that list but the previous pointer is pointing to any random node. I was asked to make a 
similar list efficiently . [ Simply a xerox of it ]
b) The second question was a string based traversing and pattern matting type 
where there were given two strings ‘A’ and ‘B’. 
I was asked to return true if all the characters in ‘B’ were present in ‘A’ or else 
return false. I explain many solutions in which he asked me to code for a particular 
solution and he verified the code by iterating though the test cases. 
The round ended with few personal questions on experience and my future role. So, I was into 
Amazon after a week of discussions

Skills:
College Name: Anna University Chennai
share interview

2 Interview Rounds

Interview Preparation Tips

Round: Test
Experience:  This interview was also HR cum technical round but it was known as a bar raiser round. 
I am not sure how to spell it too. The questions were almost the same as in the 3rd interview 
with additional questions like  “ how did you react in conflicting situations in four year career ? “.
This round also ended with technical questions :
a) Given a doubly linked list where the next pointer is pointed to the next node in 
that list but the previous pointer is pointing to any random node. I was asked to make a 
similar list efficiently . [ Simply a xerox of it ]
b) The second question was a string based traversing and pattern matting type 
where there were given two strings ‘A’ and ‘B’. 
I was asked to return true if all the characters in ‘B’ were present in ‘A’ or else 
return false. I explain many solutions in which he asked me to code for a particular 
solution and he verified the code by iterating though the test cases. 
The round ended with few personal questions on experience and my future role. So, I was into 
Amazon after a week of discussions :) 

Skills:
College Name: Anna University Chennai
share interview

3 Interview Rounds

Interview Preparation Tips

Round: Test
Experience: what is paging?
● given ‘n’, find the no. of different binary trees possible with n nodes. first tell the 
approach and then write the code.
● find the level of the given binary tree. write the code and explain.
● find the kth largest element in a given array. approach is enough here. no need to write 
the code.

Round: Test
Experience: ● write the code to print the following series, given ‘n’­no. of lines.
1
1 1(count,corresponding no. in previous line)
2 1 
1 2 1 1 (in previous line, one 2 and one 1 are there)
1 1 1 2 2 1.....
then explain the code with sample case.
● you are given a sentence ”my $#name#$ is prabhu and my native $#is chennai#$. the 
sentence contains opening and closing tag($#,#$). now you have extract the sentence 
enclosed by tags($#,#$) and replace that sentence by its replacement word,which you 
can get from given dictionary . here assume Dictionary(is chennai) returns “is madras”. 
replace it for “$#is chennai#$”. If there is any mismatching in tags, you have to find it and 
show that error. write the code for this and explain........
● class A
{public: int d;

void change(A a)
{a.d=10;}
main()
{A a;
a.d=5;
 change(a);
cout>>a.d; //what will be printed here and why?
}
­­­­­­­­­­­­­ void change(A *a)
{a­>d=10;}
main()
{A a;
a.d=5;
 change(&a);
cout>>a.d; //what will be printed here and why?
}
● class A
{};
class B:public A
{};
main()
{ A *a1=new B();
  B *b1=new A();
}
which statement is illegal and why?will it raise error?

Round: HR Interview
Experience: Questions asked were
● tell me about yourself
● what is VPTR and VTABLE? who creates it­(compiler or OS or runtime engine)?
● your strength and weakness?
● what is the big failure you faced?
● In a building, there are 2 lifts having a common button. If the button is pressed in any 
floor, any one of the lifts should go there. what are the parameters you will consider to 
select one of the lifts and justify? parameters such as weight of lift, distance,time,etc... 

Skills:
College Name: Anna University Chennai
share interview
user image R.Arockia Ratheesh Sahayaraj

posted on 10 Nov 2015

4 Interview Rounds

Interview Preparation Tips

Round: Test
Experience:     First  a paper of totally 45 questions was given.3 sections totally.Quants,Logical 
and Verbal Reasoning.Quants was pretty tough.But the rest of the sections were easy.
                     Next a question paper for management position analysis was given.This was the 
psychometric test.80 questions were there.We have to select 2 out of the 4 scenarios which are 
apt.It was mentally tiresome because they were all repeated and the numbers were jumbled up.

Round: technical + HR
Experience:   This round actually lasted more than one hour.The interviewer 
told that basically he was an ECE graduate and i can answer without nervousness.First he asked 
me to brief him about what was given in my resume.
                            Then he asked questions on my final year project like
What is CUDA?
What contribution did you do in the project?
How the NVIDIA GeForce10 card is interfaced? :P
Then he saw my Java project(Social Networking Site) and asked various questions on it for 15 
minutes.He also asked what is an RDBMS and explanation with example.
            Then he wanted the concept of my OOPS project for Buffer allocation.Told the 5 
scenarios.He asked how i coded it.I told that i used C++ STL concepts.
                    He then asked if i had prepared any puzzles.I answered yes.He told me to explain 
any puzzle which i studied.Told him the 3 switches,3 bulb lights puzzle.
                He then asked a mathematical puzzle,to find the ratio of milk:water in 2 bottles where 
1 bottle is ½ full of milk and another contains ⅓ milk and water is mixed to remaining volume.
He also asked how will you estimate the distance from Tambaram to Adyar :P
Told that it depends on the no of stops in between the route u take and the traffic on an avg :P
He then asked to write code for linked list and some questions on how to insert a new node.
Then program for generating Fibonacci sequence.wrote using recursion.he told he wanted to 
print for every number and my code was kinda “School level”.He asked how to change the code 
if i wanted to store each number in the sequence in an array.Explained to compute for each 
index and store.
         He then saw the list of workshops which i had attended and asked “What are Hadoop and 
Big Data”.explained.
He viewed my responsibilities undertaken and asked some questions on them like “What is 
coffee with java”,”What is Prayatna and its meaning (I told prayatna means journey to 
knowledge but he explained that it means effort in Sanskrit :P :D”
Why is ur CGPA low ?....samalichified
Then he asked whether i can join for Technical Support profile.I said i wanted Developer profile 
only.He again said i can switch from Technical support to developer after a few months,but i 
stood firm.

Round: Technical Interview
Experience: Explain storage type keywords in C
What is Serialization?
Bridge crossing puzzle......I solved by giving optimal solution.
How much comfortable u are with Python and MySQL(I told i was learning basics)

Skills:
College Name: Anna University Chennai
share interview
user image Prashanth

posted on 10 Nov 2015

2 Interview Rounds

Interview Preparation Tips

Round: Test
Experience:   I didn't have even a little bit of luck actually as this company was concerned. The HR was 
too informal ,so the interviews too were.
     
      Out of the 12 they shortlisted they recruited 5, so the first round was very important.There 
were two technical interviewers. One was good and the other one nonsense(according to 
me).The good one selected 4 out of all those he interviewed and the other one selected one.
      
       First he started with “tell me about yourself”, then what are your area of interests. He was 
checking everything with my resume to check if i didn't miss anything. Then about what 
companies came to your campus and why u didn't get placed in all those. Then started the 
debate.He asked me to explain my projects. I started explaining and he was telling he didn't 
know anything so he wanted me to explain as how u explain to a kid. He asked me to draw 
block diagram for one of the projects(networks) and after that i didn't know what he was talking 
and I was talking. I didn't understand his language too...he asked what kind of storage u 
use...what happens if it happens like this....he himself was not sure of what he was asking....i 
tried to explain him the network layers and what actually happens with the knowledge about tcp 
i had.But he was expecting something else.At last he told my project itself is wrong and he had 
so much concern for my project :(
      
       Then after a pause asked me to write any valid c program.......again after writing....he asked 
me to write test cases and validate it.....then asked questions about what is paging, 
segmentation .. write program for explaining virtual functions......one nice question how will u 
overload new operator.
       And that is all....i asked him the feedback..he said i am so concerned with your project again :(
I thought i was gone at that moment itself.....the problem was I didn't understand his language 
itself :( he was very rude...jus learnt the fact that the interviewer u get is very important

Skills:
College Name: Anna University Chennai
share interview

3 Interview Rounds

Interview Preparation Tips

Round: Test
Experience:  The written test was of normal difficulty. There was no negative marking and hence 
luck could help you here.. There was a section full of general aps and another section with 
technical. The technical was of medium difficulty and i would advise attending the technical part 
first.


Round: Technical Interview
Experience: The interview had two rounds, one technical and one HR. Here is where the “job goddess”
could play with your future... Her name is “LUCK” :P Cos the interview is totally 
dependent on the panel you are going to get. There were two technical people, one was very 
nice and asked easy questions, the other was a strict looking sourpuss who troubled people 
(Should i even mention I got the easy one? ;) ) Praying to Gods and asking your granny to pray 
for you would do you a lot of good ;)
                      But whoever the panel (judging by others’ experiences) , they concentrated a lot 
on basic only. Given one question, they keep questioning inside it itself. For me, around 45 
minutes went in asking about my projects. It seemed like HR at first with questions like “Did u 
and your friend face any difficulty anywhere? Did your teacher find any fault anywhere? What was 
your work in the project?” but I found it terribly difficult with every answer of mine(invented ones 
obviously :P ) being grabbed upon and asked more...Also kindly ask your job description asap cos 
he’ll surely ask you why EMC should hire you :P 
                     When i got tired after the endless list of questions, he said “Now let us start the 
interview” ??!!??!!
                     He asked just a very simple question “Implement strcpy()”... But that one question 
prolonged to fifteen minutes?! He kept probing each and every line... And questions like, what if 
i give an endless string as input? What if i pass strings which dont terminate with null? And 
many more based on it itself(cant remember)
                      With that he finished the interview. There was a HR after that with ordinary 
questions only (Why EMC and so forth) :)
                        The other panel guy followed the strategy of asking the candidates to write any 
program of their choice and lambasted them with hell lot of questions. It would do you good to 
know the coding of any complex interview question extremely well :P And he went really too 
deep into projects and OOPS 

Skills:
College Name: Anna University Chennai
share interview
user image Prashanth

posted on 10 Nov 2015

3 Interview Rounds

Interview Preparation Tips

Round: Test
Experience: 1.    Queue in O(1)  solution.. I came up with a method and it was not the most optimal one… 
and I asked if I should optimize more.. he said he was happy with the solution I gave and 
proceeded to the next question…
2.       For eg.. if there is a string abda. I shud reverse it n/2 times.. ie… say
1st rev: adba
2nd rev: (during the second reversal I shouldnot rev from beg.. but rev the string between ( i+1,j­
1) where i=0,j=n­1in the first case….)ie
a db a => a bd a….
so it is abda finally….after n/2 reversal we get the initial string which is abda.. this is a 
favourable case and I increment the count by 1…
The question is give the string length say n=4 how do u find out the total number of strings 
which will have the favourable condition after n/2 reversals…. I came up with a solution… just 
think over it.. not a difficult one… just 5mins of thinking will get u reach the right answer….
3.    There are 100 petrol pumps between two points A and B/.. u have to select 10(say) petrol 
pumps such that the largest distance between any two petrol pumps should be minimum…I gave 
a top down approach.. guess he expected a bottom up approach….  But at the end he was quite 
happy with my answer…
4. tel me a scenario where i cud use MERGE SORT AND QUICK SORT AND WHERE I CAN 
USE ONE NOT THE OTHER.. and the differences...
MERGE SORT:
when there is 1GB of things to be solved we can divide that 1 GB into A*B=1GB , such that 
each division will have a size of A(MBs)... in this case I cannot bring the entire 1GB into 
memory.. So i ll bring A(MB) into memory at a time sort it and keep it and sort all the B 
divisions and do a B­WAY Merge... which will be easier... But this kinda thing cant be done in 
quick sort...
Quick SORT:
if we want to find the Kth smallest v can use quick sort without sorting the entire array but its 
enuogh.. till the pivot element is placed at the kth position... (random select...)...... this cant be 
applied for merge sort..where v have to sort the entire thick to identify.. kth smallest...


Round: Technical Interview
Experience: This round involved all concepts right from OS, DBMS, Networks, Data structure, Algorithms, your 
projects,  a slight touch on testing…
Topics covered in each subject:
OS: Threads, process… difference.. if threads have more advantages y go for process??
Semaphores, Synchronization, concurrency problems, Second chance algorithm in virtual 
memory chapter….
DBMS: Second highest salary… TRY TO USE TOP… I TOLD HIM TWO SOLUTIONS ONE 
WITH TOP AND OTHER WITHOUT TOP … But he emphasized me to use TOP first.. So use 
that…
He gave me a set of tables and asked me write queries
Indexing was also an important concept he asked me.. B+ trees properties and how used in DB.
Normalization of my tables in my project….
Data structures:
Difference between binary trees,  hash map, Tries.
A scenario where BST has advantages than hash map without any collision.
How do we avoid collision in hash
Example of a good hash being used…(I told STL..he said no that’s a different concept.. I then 
said…Java hash map…..that was the right answer… time for getting.. most of the time O(1) and 
depending on the inputs and the things it might vary accordingly )
Tries advantages and wen can it be used….and application of it..
Networks:
Layers of OSi.. explanation of each layer 
Google.com steps involved
About DNS
Testing:
What do u know about testing…
I explained back and white box testing… alpha n beta testing.. and he said..he was  not proficient 
in it..n stopped…
Algorithms: (besides the algorithm round)
Difference in greedy n dynamic… which is better….
Kinda company oriented questions:
advantages and disadvantages of that site…
what I know About Advertising online…
all this went for around 1.5 hrs

Skills:
College Name: Anna University Chennai
share interview

Interview Questions

user image Prabhu

posted on 10 Nov 2015

4 Interview Rounds

Interview Questions

Interview Preparation Tips

Round: Test
Experience: 1.Given a no. ‘n’, find posible no. of smart strings and input alphabet is a to z(26 chars).Smart string means a string after applying following changes, resulting string is same as the original
string. smart string: given a string of size n, reverse it and again reverse it excluding the end chars at position 1 and n. Now again reverse it excluding next to end chars at 2 and n-1. continue this till you reach middle of string. eg. consider string “abcdcea”, aftet 1st reverse: “a ecdcb a”, after 2nd reverse: “ab cdc ea”, after 3rd reverse : “abc d cea”. now we reached middle of string and resulting string is same as
original string. so it is smart. after analysing the pattern i got the solution for this.
2. given a stack , i want to access the max element in O(1). it is easy one. use 2 stacks.
3. given an array of numbers containing positive and negative numbers, return the no. of contiguous subsequences which sum to 0.
4. Modification of LIS: given an array of integers, return the length of longest alternating subsequence. i.e. ace

Skills:
College Name: Anna University Chennai
share interview

2 Interview Rounds

Interview Preparation Tips

Round: Test
Experience: 1. My first question was to design a data structure to store a dictionary . I gave a solution to use 
a trie with 26 pointers for each character . Now he asked me to reduce the no of pointers . 
He gave me an example of our phone , where we use only 10 digits to make a combination of 
all the words instead of 26 different buttons of every character .
Then for this type of a system he asked me to design a data structure . Well I gave a solution 
with which he was satisfied . 
Note : for this hashing is not an efficient solution .
2. The next one was to design a data structure ( he explicitly expressed it as a queue ) where 
inserting , deleting and finding minimum is done in O(1) time . here you can use additional 
memory but they were very much concerned about the time i.e O(1)  . I answered them using 
additional queue .
3. Then he asked me a algorithm problem  . The statement goes like this
You are given two end points ( consider them as two end stations at some distance  ) 
there are 100 stations between these two . Now you need to build a train track between these 
two end points which includes only 10 stations and not more than that . Now the objective is to 
find such 10 stations such that the maximum distance between any two consecutive stations is 
minimum 

College Name: Anna University Chennai
share interview
user image Anantharam

posted on 10 Nov 2015

3 Interview Rounds

Interview Preparation Tips

Round: Test
Experience: There is a drought situation in Agrabah.King got worried and called Aladdin for helping him out. 
As he is a modern Aladdin he took printouts of places around Agrabah from google maps.For 
analyzing the map properly, he converted the map into a M x N grid. Each point is represented 
by either ‘0’ or ‘1’.
‘1’ represents the unit area of water and ‘0’ represents the unit area of land. King told him to find 
the largest continuous patch of water so that he can send his people over there.
As our Aladdin is modern, but not a good programmer, he wants your help. Help him out by 
printing out the largest area water patch available on map.


Round: Phone interview
Experience: 1)There are three types of balls arranged linearly in a random order Red, Green and Blue. Now 
your job is to sort them so that the Red balls are in front follwed by the Green balls and the Blue 
balls are pushed to the bask.
This problem was the same as sorting the array of 0, 1 and 2. we  can do this in o(n) 
using two pointers.
2)Given an n x n matrix, where every row and column is sorted in increasing order. Given a 
number x, how to decide whether this x is in the matrix. The designed algorithm should have 
linear time complexity.
a) Start with top right element
b) Loop: compare this element e with x
 i) if they are equal then return its position
 ii) e < x then move it to down (if out of bound of matrix then break return false)
 iii) e > x then move it to left (if out of bound of matrix then break return false)
c) repeat the i), ii) and iii) till you find element or returned false
3)In the same matrix mentioned above find the kth maximum element.
I said that we just need to compare the last K x K sub matrix and to find the Kth element.
4)Given a set of integers, Display the non­empty subsets whose sum is zero. For example, 
given the set { −7, −3, −2, 5, 8}, the answer is the subset { −3, −2, 5} which  sums to zero.
This is the special case of knapsack problem and hence it is NP­Complete so i said we 
cannot find the solution in polynomial time.We consider all the subsets with k elements. Then 
check how many of these sets have a sum of 0. This is an exponential time algorithm.
5)Create a data structure where inserting, deleting and finding the minimum element all have 
O(1) time.
i said we can use augmented stack where with each element we can augment the 
minimum element along with its actual value.Then he said “what if you cannot create any new 
data structure but have to use only the previously available data structures?” I replied that then 
we can use two stacks one to store the actual data and other to store the minimum values.

Skills:
College Name: Anna University Chennai
share interview