Posts for CSE Blog


Number of digits in 125^100

From CSE Blog
December 23, 2011 at 7:24 am
Source: Asked to me by Suman Kalyan Bera (M.Tech  Student IIT Delhi) on contact page Problem: How many digits does the number 125^100 have? Very interesting problem and ... (more)

Array Problems - Contiguous Sum and Distinct Elements

From CSE Blog
December 23, 2011 at 7:12 am
Source: Posted by Algo Muse on contact page. Also posted on Algo Muse (December 2011) http://www.algomuse.appspot.com Problem: 1) Contiguous t-sum problem Given an array ... (more)

Crossing the Road

From CSE Blog
December 19, 2011 at 9:19 am
Source: Quantnet Interview Questions Problem: If a car passes at the crosswalk on average every 10 seconds and you need 20 seconds to pass the road, how long does it take ... (more)

Shortest Curve dividing Equilateral Triangle

From CSE Blog
December 16, 2011 at 5:11 am
Source: Asked to me by Dinesh Krithivasan (IITM Alumnus, Phd University of Michigan, Senior Qualcomm Engineer)Finally a geometry problem for the blog. :) Thanks Dinesh! :) Problem:We ... (more)

Matrix Saddle Points

From CSE Blog
December 12, 2011 at 2:11 am
Source: Algo Muse, CSE, IIT Bombay Problem: An entry aij in a matrix is called a saddle point if it is strictly greater than all the entries in the ith ... (more)

Rubik’s Cube

From CSE Blog
December 4, 2011 at 2:05 am
Source: Asked to me by Piyush Goyal (CSE IITD Senior Undergraduate, To be Goldman Sachs Quant) Problem: Given a Rubik's Cube, find a path from centre of face to centre of cube ... (more)

Linked List Delete

From CSE Blog
December 4, 2011 at 12:41 am
Source: Asked to me by Ankush Jain (CSE IITB 2011 Alumnus, Morgan Stanley Quant) Problem: You are given a pointer to a node (not the tail node) in a singly linked list. ... (more)

Numbers on a circle - Minimum sum of consecutive differences

From CSE Blog
November 21, 2011 at 11:55 am
Source: Asked to me by Anuj Jain (MFE Grad Student at Baruch College in New York, EE IITB 2010 Alumnus) Problem: Place the numbers 1, 2, ... 9 around a circle in the positions ... (more)

21 Problems in 21 Days left for Placements

From CSE Blog
November 9, 2011 at 1:23 am
For 21 days left for IIT placements, Siddhant Agarwal (EE IITB 2011 Alumnus, CMI Grad student) and Vivek Jha (EE IITB 2011 Alumnus, Credit Suisse Analyst) have selected 21 problems ... (more)

Guess 3 numbers

From CSE Blog
November 5, 2011 at 10:39 am
Source: Quantnet ForumsProblem:A question which is asked on interview in some software development companies.I guessed 3 natural numbers - x,y,z. You can ask me about two sums ... (more)

Scaling a Square

From CSE Blog
November 3, 2011 at 5:08 am
Source: Saurabh Joshi, IIT Kanpur Problem: On a table you have a square made of 4 coins at the corner at distance 1. So, the square is of size 1×1. In a valid move, you can ... (more)

Divisibility of 111…1111

From CSE Blog
November 1, 2011 at 8:48 am
Source: Asked to Russian 7th Graders - Taken from Wild For Math Blog Problem: Is it true that among the numbers consisting of only "1"s (1; 11; 111; 1111; etc.) there is a number ... (more)

Sphagetti Breakfast

From CSE Blog
October 31, 2011 at 7:21 am
Source: Very standard problem in Quant interviews (Taken from quantnet, xkcd forums) Problem: A bowl of spaghetti contains n strands. Thor picks two ends at random and joins ... (more)

Distinct numbers in a sample draw

From CSE Blog
October 12, 2011 at 6:54 pm
Source: Asked to me by Chinmay Chouhan, Junior Undergraduate, CSE IITB Problem: Given the set of numbers from 1 to n: { 1, 2, 3 .. n } We draw n numbers randomly (with uniform ... (more)

Function Inner Product

From CSE Blog
October 10, 2011 at 8:17 pm
Source: A linear algebra problem book Problem: Find the function f  ( member of span {1, sin x, cos x} ) that minimizes norm of ( sin 2x − f(x) ), where the norm comes ... (more)

Difference between foo(void) and foo()

From CSE Blog
September 11, 2011 at 5:29 am
Source: http://stackoverflow.com/ Problem: Consider these two function definitions void foo(){ ... } void foo(void){ ..... } What is the difference between these two functions? Hint: ... (more)

C code 32 bit vs 64 bit

From CSE Blog
September 10, 2011 at 1:17 pm
Source: http://www.gowrikumar.com Problem: The following C program segfaults of IA-64, but works fine on IA-32. int main() { int* p; p = (int*)malloc(sizeof(int)); ... (more)

C++ Macro Concatenation

From CSE Blog
September 10, 2011 at 11:56 am
Source: http://www.gowrikumar.com Problem: What is the output of the following C++ code? #include <stdio.h> #define f(a,b) a##b #define g(a) #a #define h(a) ... (more)

Arrange in a Sequence

From CSE Blog
September 4, 2011 at 5:31 am
Source: Asked to me by Amol Sahasrabudhe (IITB 2004 Alumnus, Worked at Morgan Stanley Quant Division, Deutsche Bank) Problem: You are given 2n numbers ( 1 to n and 1 to n ). ... (more)

Football Board

From CSE Blog
August 27, 2011 at 2:20 am
Source: The Hidden Mathematics of Sport Problems: Football tables have been the basis of many a brainteaser over the years. These two puzzles ask you to work out what the scores ... (more)

Sacred Right Pan - IMO 2011 Problem

From CSE Blog
August 17, 2011 at 1:32 pm
Source: IMO 2011 Problem (sent to me by Dinesh Dharme, CSE IITB 2011 Alumnus, Credit Suisse Analyst) Problem: Let n > 0 be an integer. We are given a balance and n weights ... (more)

Increasing Sequence in Dice

From CSE Blog
August 16, 2011 at 11:14 am
Source: A book on probability puzzles Problem: Suppose we play a game with a die where we roll and sum our rolls as long as we keep rolling larger values. For instance, we might ... (more)

Expectation of Max Frequency

From CSE Blog
July 6, 2011 at 5:04 am
Source: Sent to me by Nikhil Garg (CSE Senior Undergrad, IITD) - who got this from Rudradev Basak Problem: There are K balls in a sack numbered 1 to K. Bob chooses a ball at ... (more)

Coin Chain Reaction

From CSE Blog
June 9, 2011 at 12:47 pm
Source: Asked to me by Prateek Srivastava (IITB CSE Alumnus 2010 and Yahoo! Software Engineer) (also asked in a quant firm placement test) Problem: We have an unlimited number ... (more)

Coin Problem : Two Heads

From CSE Blog
June 5, 2011 at 2:31 pm
Source: Asked to me by Prateek Srivastava (CSE IITB 2010 Alumnus, Yahoo! Software Engineer) Problem: We have a unfair coin with P(heads) = p ( not equal to 0.5) and P(tails) = ... (more)