A rustic village contains one million married couples and no children. Each couple has exactly one child per year. Each couple wants a girl, but also wants to minimize the number of children they have, so they will continue to have children until they have their first girl. Assume that children are equally likely to be born male or female. Let p(t) be the percentage of children that are female at the end of year t. What is p(t)? "Can't tell" is a potential answer if you don't have sufficient information.
Senior Developer Interview Questions
29,077 senior developer interview questions shared by candidates
public class WhichReturns{ public String whichReturns(){ try{ return "1"; }finally{ return "2"; } public static void main(String argv){ System.out.println("Return val: " + WhichReturns.whichReturns()); } }
Given an array of numbers [1,3,3,5,9,4,1,10,9,7,2,7], Write a php function that will print numbers that are not duplicated in array. [5,4,10,2]
Given a positive integer N, write a function to return a list of the first N fibonacci numbers in order. For example, if N=5, the output list is 0 1 1 2 3.
How do you write an algorithm to count all subsets of strings in a string.
Is this valid/what would this do (C): int *p; p=0; p++; printf("%d",p);
Write a function that determines if a tree is a BST or not
Given a very long string composed of numbers as characters, find the four character substring that has the largest multiple. For example, given the string "809723", the two char substring with the largest multiple is "97", having a multiple 9*7 = 63.
Merge to sorted arrays into second array, both arrays has N elements, but second array size is N * 2. So you merge both arrays in second array in a sorted way.
Sequence of numbers in random order and 1 of them is missing how to find that out...
Viewing 21 - 30 interview questions