Return the head node of the singly linked list with each pair of nodes swapped. If there is a last odd node leave it in place. Example: Input: 1 -> 2 -> 3 -> 4 -> 5 Output: 2 -> 1 -> 4 -> 3 -> 5
Developer Interview Questions
270,881 developer interview questions shared by candidates
Basic Java Questions: Annonymous Classes, Nested Classes etc.
You are given two integers, p and q. Complete the function calculatePower which takes two integers as arguments and returns p to the power of q, without using the built-in power function. We expect you to do better than O(q). A same input is p = 2 and q = 3, and the corresponding output is 8. Constraints: 0 <= p^q <= ((2^63) - 1)
Since i have a working experience of 1 year and 3 months, i was told to join as a Fresher, because i haven't worked professional working experience in Android Development. And for a fresher, salary is quite less as you can expect. But at the end of the day, you are getting paid while you are at learning stage. Should be enough for a fresher only.
Reverse an array
Can you cover an 8x8 chess board with dominos if two corner squares are removed (not two from the same side, 2 diagonal from each other). A domino covers 2 squares and no dominos can hang over the side of the board.
Given 10 cups to locate the bottle poisoned wine from a batch of normal ones, you can make any mixture of them and test your mixtures by mouses. However the density of poison in the mixture, the testing mouse will certainly die. And you must give all the mixtures of the 10 cups before the test. There is only one poisoned bottle. How many bottles of wine you can test at most?
1- write a java program to print the total arrangement of any string without using collection and string.
Find largest element in array without using any extra variables or any functions
Create monolithic sublists from an array of integers ,in increasing order for example [1,2,4,7,5,6,3,2] will give [[1,2,4,7][5,6],[3],[2]]
Viewing 151 - 160 interview questions