You have 17 red and 17 blue balls, and you remove 2 at a time. If the two are the same colour, add in one extra blue ball. If they are different colours, add in an extra red ball. What colour is the final ball removed?
Software Interview Questions
549,973 software interview questions shared by candidates
Suppose we can translate numbers into characters: 1->a, 2->b, ...26->z given an integer, for example, 11223, output every translation of the number.
Add two binary numbers (Input as a string)
Given an array of numbers, nums, return an array of numbers products, where products[i] is the product of all nums[j], j != i. Input : [1, 2, 3, 4, 5] Output: [(2*3*4*5), (1*3*4*5), (1*2*4*5), (1*2*3*5), (1*2*3*4)] = [120, 60, 40, 30, 24] You must do this in O(N) without using division.
To find and return the common node of two linked lists merged into a 'Y' shape.
Develop an algorithm for finding the shortest distance between two words in a document. After the phone interview is over, take a few hours to develop a working example in C++ and send it to the manager.
Een vraag. Schrijf een functie hoe je twee inputstrings kan detecteren die anagrammen zijn (een woord, fase, of naam geformeerd door het herschikken van de letters van een andere, zoals bioscoop, gemaakt door ijsman). Ze zullen van je vragen om het op de
Find the first index of the substring. Condition: Do not use java library function or regular expressions. And measure the performance of your implementation with the standard java library function. Examples: String 1: “abcdefg” String 2: “bcd” Should return 1 String 1: “abcdefg” String 2: “x” Should return -1
In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesn’t know anyone in the party. We can only ask questions like “does A know B? “. Find the stranger (celebrity) in minimum number of questions.
Number of 1's in binary representation of integer?
Viewing 101 - 110 interview questions