Programming Geek
Rated 4.1/5 based on 446 reviews

Song of Youth

This is one of the inspiring poem by Dr. A. P. J. Abdul Kalam (ex president of India).

Inspiring Speech

Perhaps this is the shortest but inspiring speech by former CEO of Coca Cola Bryan Dyson


Imagine life as a game in which you are juggling some five balls in the air. They are Work, Family, Health, Friends and Spirit and you are keeping all of these in air.

You will soon understand that work is a rubber ball. If you drop it, it will bounce back. But the other four balls- Family, Health, Friends and Spirit - are made of glass. If you drop one of these, they will be irrevocably scuffed, marked, nicked, damaged or even shattered. they will never be the same. You must understand that and strive for it.

Work efficiently during office hours and leave on time. Give the required time to your family, friends and have proper rest.

Value has a value only if it is valued.

Hacker Cup 2014 FAQ

Where can I register for the Hacker Cup?

  https://www.facebook.com/hackercup/register

Who gets T-shirts?

  The top 100 finishers from Round 2 will get t-shirts.

How many people advance?

  • Qualification round: Everyone who gets at least one problem right will advance to Round 1.
  • Round 1: The top 500 finishers will advance to Round 2. Everyone that gets the same number of points as the person in 500th place will also advance to Round 2.
  • Round 2: The top 100 finishers will advance to Round 3.
  • Round 3: The top 25 finishers will advance to the onsite final.
How is the time penalty calculated?

  The time penalty is the sum of the submission times for all of the problems that you get correct. So if you submit a problem 10 minutes into the contest and get it right, then submit a problem 30 minutes later (40 minutes into the contest) and get it right, your time penalty will be 50 minutes.

How many problems do I need to get correct to advance in the qualification round?

  Getting one or more problems correct will qualify you to compete in round 1.

When will I know whether my answers were right?

  We will judge the submissions after the round has ended.

Where are the terms and conditions / rules?

  The complete terms and conditions are here: https://facebook.com/hackercup/terms

How do I compete?

  1. Before the competition starts, we'll post a link that you can use to access the problems for that round.
  2. Write a program to solve the problem. You can use any programming language that has a free compiler or interpreter available. Your program will need to solve the input file in less than 6 minutes.
  3. Make sure that your program exactly follows the input and output formats. When you run your program on the sample input, it should produce the sample output.
  4. When you are confident that your program is correct, download the input file. This will start a 6-minute timer. You must upload your output and your source code before the timer ends to get credit for the problem.
  5. If you accidentally submit the wrong files or you realize that there is a problem with your program, you can resubmit as many times as you need to during the 6 minutes. Once the 6 minutes has ended, you may not submit again for that problem. The last submission within the 6 minutes will be used for grading.
  6. After the round has ended, we'll judge the problems. If you advanced to the next round you'll be notified via email.  

When are the rounds?



What are the prizes?
  • 1st Place: $10,000 USD
  • 2nd Place: $2,000 USD
  • 3rd Place: $1,000 USD
  • 4th-25th Place: $100 USD

Facebook Hacker Cup 2014


The Facebook Hacker Cup 2014 schedule is announced. It's too early for 2014 Facebook Hacker Cup as it used to happen in January every year. So including this one we have two Facebook Hacker Cup started this year while it is officially announced that this is 2014 Hacker Cup. I participated in January this year and could clear only qualification round. Let me see what happens this time. So let us hope some interesting problems in this contest and a healthy competition from the geeks across the globe.

So here goes the schedule :

Nov 21-24 -- Online Qualification Round
Dec 7 -- Online Elimination Round 1
Dec 14 -- Online Elimination Round 2
Dec 21 -- Online Elimination Round 3
Feb 20-21 -- Onsite Finals at Facebook

Register yourself here : 
https://www.facebook.com/hackercup/register

Data Entry System

This is just the fun project developed using servlet, AJAX and JDBC. I developed  Data Entry System as a part of the internship application for  Techsys Software and Solution.

This is exactly what  I was asked for :

You may create desktop/web application based on the given below specification- 


There must be two types of user
First user must be Data Entry Operator(he must be able to log in with user name and password as DEO),he must be able to enter all the data of students that is
1>Name
2>Roll no
3>Branch
4>Section
5>Year of admission
6>Phone no
7>Photo
8>Email id

Please note,DEO must be able to edit/delete all these information any time if required
There must also be search bar where DEO can type roll no,branch,Phone no or anything and can get that student profile.
Second type of user will be student,by default his username and password will be his roll no.
When student log in first time he will automatically redirected to page where he can set his password and give security question and security answer
And student must be able to see all the info entered by DEO.


Download the project here.

Dynamic Programming : Floyd Warshall Algorithm

Floyd Warshall Algorithm computes shortest distances between all pair of vertices of a directed graph. It can be used to find shortest path as well by simply keeping track of intermediate vertices. This algorithm is a dynamic programming algorithm and exhibits both optimal substructure and overlapping sub-problems.

Input    :  input is a directed weighted graph.
Output : Shortest distance between pair of vertices.

It tries to find out the shortest distance between the vertices by inserting intermediate vertex that can lead to optimal solution i.e if u ,v and w are three vertices and we have shortest distance between u & w and w & v and the distance between u and v is greater than that of uw and wv than going to v from u via w can be beneficial.

Following program implements the same algorithm:



import java.util.Scanner;

/**
 *
 * @author VIKKU
 */
public class FloydWarshall {

    static int[][] cost;

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int vertices, edges;

        System.out.println("Enter number of verices: ");
        vertices = Integer.parseInt(sc.nextLine());

        System.out.println("Enter number of edges: ");
        edges = Integer.parseInt(sc.nextLine());

        cost = new int[vertices][vertices];

        init(cost);

        System.out.println("Enter " + edges + " edges and cost :");

        for (int i = 1; i <= edges; i++) {

            String[] s = sc.nextLine().trim().split(" ");
            cost[Integer.parseInt(s[0])][Integer.parseInt(s[1])] = Integer.parseInt(s[2]);

        }

        floydwarshall(cost);

        System.out.println("Shortest distances are :");

        for (int from = 0; from < cost.length; from++) {

            System.out.println("");

            for (int to = 0; to < cost.length; to++) {

                System.out.print(cost[from][to] + "\t");

            }
        }
    }

    public static void init(int[][] cost) {

        for (int from = 0; from < cost.length; from++) {

            for (int to = 0; to < cost.length; to++) {

                if (from != to) {

                    cost[from][to] = 999999999;

                }
            }
        }
    }

    public static void floydwarshall(int[][] cost) {

        for (int from = 0; from < cost.length; from++) {

            for (int to = 0; to < cost.length; to++) {

                for (int via = 0; via < cost.length; via++) {

                    if (cost[from][to] > (cost[from][via] + cost[via][to])) {

                        cost[from][to] = (cost[from][via] + cost[via][to]);

                    }
                }
            }
        }
    }
}