Archive for January, 2010



Improved MST Algorithm

Tired of studying the same 2 algorithms (Prism and Kruskal) for developing a Minimum Spanning Tree..? Here you can try a new algorithm developed by a computer science student. Pretty straight forward and simple.
The algorithm presented here uses greedy approach to the problem, since at every stage, it makes a choice that looks best at [...]

Identifier Extracter

The following piece of code is a part of my B.tech project. The objective is to extract all the identifiers used in any function, store them in an array, var[][] and to copy all the executing statements (statements like sum++; prod=sum%10;) which are not present in any subblock (like a for or while loop or [...]

Sudoku Generate

The java program below shows how to generate practically infinite number of Sudoku puzzles. The logic behind the coding is quite simple. The whole program is divided in 2 parts :
1. A generater that  randomly selects 28-32 grids among the 81 grids and fills random digits (1-9) in these grids such that the conditions [...]

Combinations

Finding the the desired number of combinations from any given set of items is quite helpful in solving various types of problems. The C code has been presented below.
The executable file can be downloaded from here : COMBINATIONS
#include “stdio.h”
void printc(int comb[], int k) {
int i;
printf(“{“);
for (i = 0; i < k; ++i)
printf(“%d, “, comb[i] + [...]

Mind Game

The coding given below is of a simple game in which the objective is to arrange the numbers in ascending order using direction keys. Playing the game is quite simple. Pressing the direction keys will cause the shifting of the blank space and the neighbouring numbers. The executable file can be downloaded from here : [...]

| Shop Free Cellular Phones at Bestincellphones.com. | Thanks to Best CD Rates, iCellPhoneDeals.com Offers Best Cell Phone Deals. and Incinerador De Grasa