Given a number n, find the largest number just smaller than n that can be formed using the same digits as n.
10.200 Domande di colloqui condivise dai candidati | software developer engineering
The first question he gave me was not hard. 1. You call to someone's house and asked if they have two children. The answer happens to be yes. Then you ask if one of their children is a boy. The answer happens to be yes again. What's the probability that the second child is a boy? 2. (Much harder) You call to someone's house and asked if they have two children. The answer happens to be yes. Then you ask if one of their children's name a William. The answer happens to be yes again.(We assume William is a boy's name, and that it's possible that both children are Williams) What's the probability that the second child is a boy?
Implement a power function to raise a double to an int power, including negative powers.
Implement division without using multiplication or division. It should work most efficient and fast.
Given an array of numbers, find all combinations of two numbers whose sum is a given number n.
You are given an array with n positive integers where all values in the array are repeated except for one. Return the one that is not repeated.
Given a sorted array, write a program to decide if two elements sum up to a third.
There is an NxM grid containing a robot at (1, 1) and a destination at (N, M). Robot can move only up or right. Some locations can have obstacles. Find the number of unique paths from (1, 1) to (N, M). What is the time complexity of your algorithm?
How to determine if an Array of integers contains 3 numbers that sum to 0
25 racehorses, no stopwatch. 5 tracks. Figure out the top three fastest horses in the fewest number of races.
Stai visualizzando 1 - 10 domande di colloquio