Sieve of Eratosthenes
The task is to find all the primes between 1 to N.Numbers are called prime if they do not have any factors other than 1 and the number itself. Brute Force- Each...
The task is to find all the primes between 1 to N.Numbers are called prime if they do not have any factors other than 1 and the number itself. Brute Force- Each...
Merge Sort is an example of a divide and conquer algorithm. A Divide and Conquer algorithm solves a problem using following three steps- 1. Divide: Break the gi...
In the previous post, I showed you how to create a basic Options Menu in Android activity. Sometimes, a situation may arise that you need to change the menu ite...
The problem is to find shortest distances between every pair of vertices in a given edge weighted directed graph. The graph is represented in the form of an adj...
We can have Options Menu in Android activities. Options Menu is the one that appears when the Menu button on the device is pressed. Many applications do nothing...
We have a sequence of integers and we need the maximum sum from the continuous sub-sequences. Example- Let the sequence of integers be (3,-4,5,-7,8,-6,21,-14,-9...
Given a list of integers,our task is to find if a sub-sequence which adds to a given number exists or not. Example- The given list is (1,4,20,5,5) and the given...
This post is aimed at giving you a little idea about what Eclipse IDE is and how you can use it’s features to the fullest for relatively faster coding. This is ...
We saw that on creating an Android Application Project, a skeleton “Hello World” application is created. The “Hello World” module is always the first step to le...
This is a short note on using binary search, in continuance of my series on Algorithms. Suppose we have to find whether a particular element exists in the sorte...