Why not the next Facebook ? — Mind On Web

The title is the question that is being asked to a lot of programmers, sometimes because of childish curiosity or sometimes as a means of even an insult. Fascinatingly both of the reasons do not change the highly irritating and impractical nature of the question. See to all those non-programmers out there, those who are […]

via Why not the next Facebook ? — Mind On Web

The Path with the Greatest SUM

capture

 

That’s the question folks. The questions asks to choose the path that results in the greatest value of Summation. Now for the time being lets brute force through the entire tree.  Continue reading “The Path with the Greatest SUM”

The 1000th FIBONACCI

The Fibonacci sequence is defined by the recurrence relation:

Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.

Hence the first 12 terms will be:

F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144

The 12th term, F12, is the first term to contain three digits.

What is the index of the first term in the Fibonacci sequence to contain 1000 digits?

Umm well the question is pretty self explanatory. I would advice caution on which language you use it to solve. 
Continue reading “The 1000th FIBONACCI”

Non-Abundant Sums and Solution

Another projectEuler problem. Do try it. Its an interesting one. Not hard but interesting one.

A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number.

A number n is called deficient if the sum of its proper divisors is less than n and it is called abundant if this sum exceeds n.

As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24. By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.

Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers.

Continue reading “Non-Abundant Sums and Solution”

POINTERS.

When you point at the data it POINTERS YOU BACK !!! …….

Ok i know that above quotation has no point behind it. But i had to give some quirky line to start the topic. Because this topic can become a nightmare for most people. And especially to those people who generally use Scripting language or are more comfortable with non traditional programming language that lack the concept of interacting with the memory pool directly (even technically that won’t be right but you get the point) and also to those who are new to it. Ok so lets begin than. But before that forget every notion about variables you had till now. This now what you will learn will allow you to understand what a variable is to a compiler . Lets begin. Continue reading “POINTERS.”

Question 9. and Solution

To be honest i am overwhelmed after i got this one in one go. :p seriously you will know the happiness once you get it right without any error. But anyway so here is question. I picked it up while learning JScript. Try it.

So your objective is to create a function which can convert any number into its roman number counter part. Like 1 should be “I” and 55 should be “LV” and 3999 should be “MMMCMXCIX”. Try this one. Continue reading “Question 9. and Solution”

Question 1.

Sundays are lazy and so am i. The easiest of all. The novice level question which can be even be solved by maths. By geometric progression. 

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

You don’t even need computer programs for it. 🙂 . But still try and make one.