Wednesday, 22 January 2014

Networking



How to Post to Facebook, Twitter, and Google+ at the Same Time


How to Post to Facebook, Twitter, and Google+ at the Same Time
Google doesn't make it easy to crosspost from other networks to Google+, but that's okay—turn it around and use Google+ as the feed for your other social networks instead! Here's how to funnel all of your Google+ posts (or just the posts you want) over to Facebook or Twitter using IFTTT.

This tip comes to us from Magenta River Photography, who uses a similar approach to share photos across networks easily. You'll need two tools to make this work. IFTTT, of course, and Yahoo! Pipes, which will give you an RSS feed of your public (not your private or circle-only) Google+ posts. Here's how to set it all up:

Thursday, 9 January 2014

DFS VS BFS


               DFS VS BFS


 DFS (Depth First Search) and BFS (Breadth First Search) are search algorithms used for graphs and trees. When you have an ordered tree or graph, like a BST, it’s quite easy to search the data structure to find the node that you want. But, when given an unordered tree or graph, the BFS and DFS search algorithms can come in handy to find what you’re looking for.

Saturday, 14 December 2013

Hashing

Hashing,Hash Data Structure and Hash Table

Hashing is the process of mapping large amount of data item to a smaller table with the help of a hashing function. The essence of hashing is to facilitate the next level searching method when compared with the linear or binary search. The advantage of this searching method is its efficiency to hand vast amount of data items in a given collection (i.e. collection size).

Due to this hashing process, the result i
s a Hash data structure that can store or retrieve data items in an average time disregard to the collection size.

Hash Table is the result of storing the hash data structure in a smaller table which incorporates the hash function within itself. The Hash Function primarily is responsible to map between the original data item and the smaller table itself. Here the mapping takes place with the help of an output integer in a consistent range produced when a given data item (any data type) is provided for storage and this output integer range determines the location in the smaller table for the data item. In terms of implementation, the hash table is constructed with the help of an array and the indices of this array are associated to the output integer range.

Binary Tree


Binary tree traversal: Preorder, Inorder, and Postorder

In order to illustrate few of the binary tree traversals, let us consider the below binary tree:












Preorder traversal: To traverse a binary tree in Preorder, following operations are carried-out (i) Visit the root, (ii) Traverse the left subtree, and (iii) Traverse the right subtree.
Therefore, the Preorder traversal of the above tree will outputs:
7, 1, 0, 3, 2, 5, 4, 6, 9, 8, 10