ALGORITHMS

Problem Source: UVA Online Judge - 10986

Brief Analysis: As a first problem of Dijkstra, a very straight-forward problem chosen. Just read and code.

Continue reading...

Problem Source: UVA Online Judge - 567

Brief Analysis: As a first problem of Floyd-Warshall, a very straight-forward problem chosen. Just read and code.

Continue reading...

Bipartite Graph Check is quite easy and can be implemented using BFS or DFS. I am assuming you already know what is Bipartite Graph. There is one critical case that comes in my mind right now is following one:

Now I will show a DFS based implemention of bipartite check. You might already know...

Continue reading...

ALL_BITS:

Getting an integer with all bits set. Following expression will provide us an integer of 31 bits where all bits set. Maximum positive integer of **int** data type.

(1 << 31) - 1

#define ALL_BITS                 ((1 << 31) - 1)
NEG_BITS:

Given an integer N, generate a new intege...

Continue reading...

Linked list is 101 type data structures. Two types of linked are available. Singly linked list and Doubly linked list. Basic operation of linked list is too much easy that no description needed for them. Nevertheless I am gonna write down one line description below. Most interesting thing about...

Continue reading...