Infosys Interview Questions
- 0of 0 votes
AnswersA flipping rule is given as a follows: Consider a series of positive integer. Take three numbers in the series next to each other. On applying the flipping rule to these numbers, the right most number will go to the left most number position and the other two numbers will move one position to the right at the same time. The rule can be applied to any three numbers present next to each in the series and can be applied as many times as needed.
- Info.Dubey March 03, 2016 in India
Given n as the number of element in the original series, elements of the original series and a target series of a numbers, figures out if the target series can be created by flipping numbers of the original number and output the word “POSSIBLE” followed by the number of times the flipping rule has to be applied. In case, the target series cannot be formed, output the word “IMPOSSIBLE”.
Example :
For a series with 4 elements in it, 1 3 4 2 a new series = 4 3 2 1 can be formed by applying flipping rule as follows, From the table below we can say the output is POSSIBLE 3.
Steps
Series
The three Numbers Flipped
Resultant Series
1
1 3 4 2
1 3 4
4 1 3 2
2
4 1 3 2
1 3 2
4 2 1 3
3
4 2 1 3
2 1 3
4 3 2 1
Example input
Example OutPut
4 1 3 4 2 4 3 2 1
POSSIBLE 3
6 1 2 3 4 5 6 6 5 4 3 2 1
IMPOSSIBLE| Report Duplicate | Flag | PURGE
Infosys Software Developer C++ - 0of 0 votes
Answerswhat is the difference between internal repository and internet repository?
- Muni July 09, 2014 in India| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Java - 0of 0 votes
Answerswhat about your project performance...how can i answer this question?
- Muni July 08, 2014 in India| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Java - 0of 0 votes
AnswersHow to convert http to https in java....can anyone knows please tell me?
- Muni July 08, 2014 in India| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Java - 0of 0 votes
Answerspublic class Gen { public static void main(String[] args) { Integer i1 = new Integer(1); Integer i2 = new Integer(1); System.out.println(i1 != i2); System.out.println(i1 <= i2); System.out.println(i1 >= i2); } }
WHY THE OUTPUT IS TRUE IN ALL CASES?
- onlinesoumitra May 10, 2014 in India| Report Duplicate | Flag | PURGE
Infosys Analyst Java - 0of 0 votes
AnswersConsider an array which may contains the alphabets from A to Z.
- pippirisaikumar.9 January 11, 2014 in India
suppose consider the below examples
A[9] = {A,C,D,G,D,E,A,C,A}; then the output should be in the format of A=3;C=2;D=2;E=1;G=1
A[9] = {A,B,D,C,D,B,A,B,A}; then the output should be in the format of A=3;B=3;C=1;D=2
write the logic in C. the values in array may vary. the output should count the alphabets in the array| Report Duplicate | Flag | PURGE
Infosys Developer Program Engineer - 0of 0 votes
AnswersSuppose an array contains below values
- pippirisaikumar.9 January 06, 2014 in India
A = {A,B,C,B,A,C,A,B,C,A} then the output should display in the below format
A=4;B=3;C=3
Could you please send the logic for the above question in C ?| Report Duplicate | Flag | PURGE
Infosys Developer Program Engineer - 0of 0 votes
Answersquicksort using divide and counquer . Need code please java
- fgfsdgs November 18, 2013 in United States| Report Duplicate | Flag | PURGE
Infosys Java Developer Java - -2of 2 votes
AnswersThe bin packing problem is an example of a wide set of problems. The task is to find how many set sized bins are required to hold a number of differently sized boxes. How many bins (10 units high) are required to contain the following boxes (1,3,4 and 5 units high)?
- vari007 May 18, 2013 in India| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Automata - 0of 0 votes
AnswersWrite a program to calculate the Loan Balance, where a person borrows an amount A and in return he/she agrees to make N payments per year, each of amount P. While the person is repaying the loan, interest will accumulate at an annual percentage rate of R, and this interest will be compounded N times a year (along with each payment). Therefore, the person must continue paying these installments of amount P until the original amount and any accumulated interest is repaid.
- vari007 May 18, 2013 in India
NOTE: The formula to calculate the amount that the person needs to repay after T years is -
Balance Amount after T years = A[(1+R/N)^NT]-P| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer C# - 0of 0 votes
AnswersGiven a list L of integers, a1 , a2 , . . . , an , and an integer M , describe an algorithm that finds the largest
- svKris October 02, 2012 in India
subset of L whose sum is at most M . Your algorithm should run in linear time| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Algorithm Arrays - 0of 0 votes
Answersint[] array = {3,-1,-2,2,2,3,2,-6,2,3,-8,0,2}; out put needed : {3,2,2,3,2,2,3,0,2,-1,-2,-6,-8} order is maintained and -ve numbers are sent to rightmost in order.
Design a code with single iteration to do it.
- sujita July 03, 2012 in United States for I| Report Duplicate | Flag | PURGE
Infosys Site Reliability Engineer Arrays - 0of 0 votes
AnswersHow will you find out size of a variable without using sizeof ();
- Avi June 20, 2012 in India| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer C - 0of 0 votes
Answerswhat does the yeild method do in case of a thread lifecycle ? Explain with a neat example demonstrating the use of yield method?
- Deepak August 30, 2011| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Java - 0of 0 votes
Answer
- padmini jain June 21, 2011c++
| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer C++ - 0of 0 votes
Answersfind all the subset of an array having integers from 1 to 9 such that sum of each subset is 10.
- Birendra Singh Bisht June 07, 2011| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Algorithm - 0of 0 votes
AnswersYou are given an array say
- Anonymous July 26, 2010
5,4,2,7,9,6
You need to convert it to a sorted array in minimum operation where only operation allowed is decrement.
For example above array becomes
2,2,2,6,6,6 (operations=9)| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer - 0of 0 votes
Answerswhat is the maximum number of binary trees that can be formed using 3 unlabeled nodes ? explain..
- anonymous August 08, 2007| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Algorithm - 0of 0 votes
Answerswrite a program to check if the tree is BST
- Ravi Kant Pandey April 04, 2007| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Coding Algorithm - 0of 0 votes
AnswersThere are 3 societies a, b, and c. A lent tractors to B and C as many as they had. After some time B gave as many tractors to A and C as many as they have. After sometime c did the same thing. At the end of this transaction each one of them had 24.
- Ravi Kant Pandey April 04, 2007
Find the tractors each originally had.| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersThree friends divided some bullets equally. After all of them shot 4 bullets the total no. of remaining bullets is equal to that of one has after division. Find the original number divided.
- Ravi Kant Pandey April 04, 2007| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersWrite an algo to exchange the elements of secondary digonal of a matrix.
- Ravi Kant Pandey March 30, 2007| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Algorithm - 0of 0 votes
AnswersHow many ways can you paint a cube if you have three colors of paint?
- Ravi Kant Pandey March 30, 2007| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersWhat is the benefit of using StringBuffer?
- Ankur Dhawan June 26, 2006| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Coding Terminology & Trivia - 0of 0 votes
AnswerWhat log file can you refer to for determining if a JUnit test failed?
- Ankur Dhawan June 26, 2006| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Java Terminology & Trivia - 0of 0 votes
AnswerHow does Struts implement MVC?
- Ankur Dhawan June 26, 2006| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Terminology & Trivia - 0of 0 votes
AnswersIn Java, if we insert a return statement inside the try block of a try-catch-finally, will the finally block still get executed?
- Ankur Dhawan June 26, 2006| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Terminology & Trivia - 0of 0 votes
AnswersOther questions as came up during the conversation ... total of 45 minutes on the phone. Informed me that HR will be in touch for a 2nd technical interview.
- Ankur Dhawan June 26, 2006| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer General Questions and Comments