Chennai interview questions | Glassdoor.co.in

# Interview questions in Chennai

Cognizant Technology Solutions Interviews in Chennai

www.cognizant.com /  HQ: Teaneck, NJ

742 Interviews in Chennai (of 4,846)

2.6 Average

Tata Consultancy Services Interviews in Chennai

www.tcs.com /  HQ: Mumbai, IN

633 Interviews in Chennai (of 6,556)

2.7 Average

Infosys Interviews in Chennai

www.infosys.com /  HQ: Bengaluru, IN

411 Interviews in Chennai (of 5,840)

2.6 Easy

## Interview Questions in Chennai

Sort: RelevancePopular Date

7 Jun 2012

### Software DesignEngineer In Test (SDET) at Amazon was asked...

20 Feb 2011
 Given a number find it is one less than the power of two. 15 AnswersThe question could have been a little more detailed, most of the guys who took up the test could not understand this immediately.Given a number N, XOR it with N+1 = powers of 2 will give all 0s@Anonymous. That's not true. 3 in binary is 11 and 4 is 100, if you XOR 011 and 100 you will get 111, not 000. I think you meant to say that all numbers will be 1s.Show more responsesN xor (N+1) = 2*N + 1If the least bit is 1, then it is equal to N less than power of 2 if ( n << 7 ) cout << "It is one less than power of 2" For example 1 - 0000 0001 3 - 0000 0011 5 - 0000 0101 7- 0000 0111// the power of two is always has the first bit set to1 and rest all would be set to 0. And one less than power of 2 has all the bits set to 1 except the fist bit. for example 16 = 10000 and 15 = 01111 Now if you do bit operation & on 16 and 15, you get zero. Hence, below is the code. public boolean oneLessPowTwo(int num){ boolean b = false; if(n & n+1 == 0){ b = true; } return b; }the power of two is always has the first bit set to1 and rest all would be set to 0. And one less than power of 2 has all the bits set to 1 except the fist bit. for example 16 = 10000 and 15 = 01111 Now if you do bit operation & on 16 and 15, you get zero. Hence, below is the code. public boolean oneLessPowTwo(int num){ boolean b = false; if((num & (num+1)) == 0){ b = true; } return b; }A one line answer to this question is: -1 + 2 to the power of -2 - language binary string prefix + length of binary string for N In Python: 2**(len(bin(511))-3)-1 Simple one line in any language with a function to convert int to binary string.8 anwerJust another option of doing this Boolean checkNumber(int inputNum) { int temp = 2 ; while(temp < inputNum) { temp = temp * 2 ; } if(inputNum == temp-1) return True; else return False; }can any1 say it clarly..wt is dz 15+01111??can any 1 say it clearly?package amazonExcerise; import java.util.Arrays; import org.apache.jasper.tagplugins.jstl.core.ForEach; public class concatenationArrays { public static void main(String[] args) { int a[] = { 1, 3, 77, 78, 90 }; int b[] = { 2, 5, 79, 81 }; int c[] = new int[9]; int j = 0; for (int i = 0; i 4) { c[i] = b[j]; j++; } System.out.print(" " + c[i]); } Arrays.sort(c); System.out.println(""); System.out.println("Sorted Array"); for (int i : c) { System.out.print(" "+i); } j = 0; System.out.println(); System.out.println("Array A:"); j = 0; for (int i = 0; i = 5) { b[j] = c[i]; System.out.print(" "+b[j]); j++; } } } }Show more responsesFor a number n, if n <= 1 the question doesn't really make sense. You can approach custom essay writing services for getting more details for your academic works.Visit http://essayguardian.com/.N is the number so (1<

14 Nov 2012

### Souschef at Hyatt was asked...

22 Jul 2012
 what is your expectation in next 5 years10 AnswersA Successful Person. with every dream fulfilled by self.I want ot get out from herei want success in my life.Show more responsesto be usefull to other people around the world.I hope to make a career,taking some hihg position in Hyatt companyto succesfull,,,and have own businessto be successful and have my desire position in Hyatt company.searching the perfect position in a reputed brand and willing to be permanant with youTo always Bring a satisfactory smile on our guests' face......with our services'....we'll get success and reputed post automatically .haha....It is 5years after you posted this question..ya there is a lots of changes..GST, NO MORE 1000rs...

### Software Development Engineer at Scantron was asked...

2 Feb 2012
 Puzzle: There are 25 horses and 5 lanes for conducting a race among them. In a minimum of how many races, would be able to find out the 3 fastest horses among them? Assumption: Speed of horses are consistent enough across races.5 AnswersAnswer: 76 because 5 races req to find 5 fastest and 1 race to determine the top 3 out of the 5 fastest7Show more responses65, just because its speed is consistent between races, so we need note down time taken by all the horses, for this 5 races needed ( 5 lanes and 25 horses ). From the list identify top 3, thats simple!

### Associate at Amazon was asked...

21 Jan 2014
 A bucket is kept under the tap and the tap is opened to let out water. Though water is flowing out, the bucket never seems to be full. why?6 AnswersBucket has not evenly placed .Bucket has not evenly placed .Bucket has a holeShow more responsesprobably the bucket must have kept upside downMay be Tap & bucket are not aligned such that water rushing out of the Tap doesn't seem to fall in to the bucket.Seems their is a hole in the Bucket.

### Quantitative Analyst at Goldman Sachs was asked...

26 Dec 2012
 What is the expected number of tosses required to achieve 2 heads in an unbiased coin?5 Answers6 tosses using Markov-techniquesI got 4 as the answer...Expected number of steps required to obtain N consecutive heads by tossing a fair coin is given by En = 2^(n+1) -2 For n = 2 ; E2 = 6 For further details see - http://www.qbyte.org/puzzles/p082s.htmlShow more responsesThe question does not state 2 "consecutive" heads.answer would be 6 if it was 2 consecutive heads, but for 2 heads it is 4.

### Assistant Systems Engineer at Tata Consultancy Services was asked...

20 Oct 2012
 What will you do when your girl friend is getting married on the same day as a important client meeting?5 Answersi will do marriage first because meeting may be postpond or prepaid but marriage date not come again again.right manright manShow more responsesyes, firstly i will do marriageYes

### Content Quality Associate at Amazon was asked...

1 Sep 2012
 Nothing out of the ordinary. Some simple questions on time management, but that is pretty much it4 AnswersLike I said, nothing in particular.Having QAE interview with amazon this week,Can you let me know the possible qauestions and rounds...Having QAE interview with amazon this week,Can you let me know the possible qauestions and rounds...Show more responsesHaving QAE interview with amazon this week,Can you let me know the possible qauestions and rounds...

### Software Engineer at ThoughtWorks was asked...

8 Jul 2012
 A box is divided into 4 boxes which is further subdivided into 4 boxes and so on. What is the best Data structure suitable for this scenario? 5 AnswersI gave an answer as tree bcos any tree can be converted to a Binary tree. But the interviewers where not satisfied with the solution.QuadtreeI think it should be Stack.There is recursion involved.Show more responsesthey might be looking for B Treetree is the correct answer. it is best suited for retriving also
110 of 14,166 Interview Questions