Euler Problem 3: Largest prime factor : C Programming Solution

Problem :

The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of the number 600851475143 ?

Solution Approach :

Simple approach would be to identify all the prime numbers under the square root of the number 600851475143 which divide the the number 600851475143. When you find a prime factor using this method, keep the track of largest such number to get our result. Read More…

Categories: Programming

Euler Problem 2: Even Fibonacci numbers : C Programming Solution

Problem 2:

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …

By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.

Solution Approach:

Question starts of with introduction to Fibonacci sequence, which by the way, is a very interesting topic and highly encourage you guys to read about it in web whenever you get time.

Idea is to get the “next” element of Fibonacci series by adding the “present” and “previous” element.  When the element is an even number, add to the “sum” variable. Very simple indeed. Give it a try for yourself before checking the problem solution below. Read More…

Categories: Programming

Euler Problem 1: Multiples of 3 and 5 : C programming solution

Problem Statement :

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.

Solution Approach:

Being the first problem of the series, its quite a simple one. there are many ways to approach this problem.

Most simplest one is  to iterate through all the numbers from 3 to 1000 and check if its divisible by 3 or 5. If they are, just add them to the sum. Read More…

Categories: Programming Tags: Tags: , , ,

Checklist before formatting your android phone

maxresdefaultWell lately I was experiencing some sluggish performance with my android phone. So I decided to format the baby and  bring it back to life. I was sure that later down the road , I will be requiring to do same again. So thought of adding this post in the blog, so that other also can use it.

You can format the phone for other reasons as well. Maybe you install a lot of apps, and some of them are acting a little mischievous, or maybe something has just gone wrong deep down in the system where you have little chance of fixing it. At times like this, you could agonize over tweaks and possible fixes, or you could spend time uninstalling different combinations of apps. But maybe wiping the phone clean and starting over is the best overall option sometimes. Read More…

Categories: Professional, Technology Tags: Tags: , , , ,

A decade, waiting for 3G !

Finally 3G is actually hitting the streets of India. Slowly,but for sure. Now, if you are mistaken 3G for a mobile technology that will revolutionize the overall mobile experiance then I ‘m sorry for you,my friend. Why? The reasons are several.

Lets begin with “3G” itself. First of all , it’s not a technology.It’s a generation of standards for mobile phones and mobile telecommunication services. According to 3G as a “standard” it must fulfill the International Mobile Telecommunications-2000 (IMT-2000) specifications by theInternational Telecommunication Union. Application services include wide-area wireless voice telephone, mobile Internet access, video calls and mobile TV, all in a mobile environment. To meet the IMT-2000 standards, a system is required to provide peak data rates of at least 200 kbit/s. Read More…

FACEBOOK DOWN !

facebook down

Facebook was down now. It was up soon but was draggingly slow. Search was not working. I hope its not hacked, like what had happened with twitter the other.
Just in case if you are wondering what is this dude talking about, let me tell you that twitter was hacked, very recently. They hacked twitter and wrote “I am a nice pirate”. Huh? Thats it?? Oh! I left the most important part. They wrote the message from Mr.Obama Barracks account ! Wow! That sounds cool. Read More…

Categories: Technology Tags: Tags: , , , ,