Welcome to MSDN Blogs Sign in | Join | Help

December 2005 - Posts

Fibonacci system

We typically learn binary system, hex system in our courses. Most of them are predictable in their position values or they are linear. This system is not linear as its dependant on Fibonacci series. 3 is the first duplicate (ignoring 1 as we started with
Posted by sriram | 3 Comments

Two digit numbers

I always wondered how to place digits 0 to 9 in a matrix which contains all the digits from 00 to 99 and what is the minimum matrix size that is needed.In this question we are trying to enumerate the number of numbers we can produce. Lot of people are
Posted by sriram | 2 Comments

Counting bits - continued

Lot of people sent code with counting bits method. Some people also sent the permutations sequence and expressions to say how many numbers exist before N that have same 1's in binary form. Counting 1's in a number is better than O(N) algorithm where N
Posted by sriram | 4 Comments

Number of 1s problem

Previously I asked a question regarding the distribution of how many swaps are needed to move array elements. Here we are trying to count the number of 1's. Counting number of 1's vs the distribution table (All numbers which have 2 1's and how many times
Posted by sriram | 2 Comments

December 13th brain teaser

[ Go to http://www.microsoft.com/india/code4bill/SampleQuestion.aspx to see the question - Sriram] Trying to move to coding related questions from number sequences. The reason I chose 32 is to make sure recursion doesn’t terminate quickly. Not trying
Posted by sriram | 1 Comments

The power of 2! (Dec 12th Brain teaser)

[ To see the question referred to in this blog post, check out www.code4bill.com (the Dec 12th brain teaser) - Sriram Krishnan] The previous two questions were easy to crack by writing simple code. So I thought we could use some machine power to actually
Posted by sriram | 7 Comments

Oh My God!

I'm sure several people had had this experience. You spend a lazy Saturday at home whiling away your time and sleeping. Sunday morning, you come to work, open your email and you go 'Oh My God!' at something you see in your email and you curse yourself
Posted by sriram | 6 Comments

37

As I stated in the morning the number 37 is key to getting results which contain the same digits 37 * 3 = 111 Then variations of this like 74 * 3, 37 * 6....... bring the results 111, 222,etc. Then starts the next series 37037 and the other number people
Posted by sriram | 3 Comments

Question for the day

A * BCDEF = GGGGGG This is another question that's about working on the digits of a number. It all starts with 37 * 3 = 111.After that you will see lot of numbers which produce the same digit in the resulting number and are in some way related to the
Posted by sriram | 62 Comments

Code4Bill begins!

Welcome to the Code4Bill blog! If you’ve found your way here, I’m sure you already know what Code4Bill is. If you don’t, here’s a quick refresher – Code4Bill is a contest aimed at finding the best student programmers in India. If you thought that you
Posted by sriram | 87 Comments
 
Page view tracker