Monthly Archive: October 2015

0

Binary tree traversal

Problem description : Tree traversal (a.k.a tree search) is a form of graph traversal and refers to the process of visiting each node in a tree data structure, exactly once, in a systematic way....

0

Create a binary search tree in javascript

Create a simple binary search tree data structure in javascript. Binary tree : It is a tree data structure in which each node has at most two children, which are referred to as the...

Create a simple queue using javascript 0

Create a simple queue using javascript

Problem description : Create a simple queue data structure in javascript. Queue organizes data into the sequential order. It similar to the a queue of people waiting to get a bus ticket. It’s a...

Implement a stack using javascript 0

Implement a stack using javascript

Problem description : Create a stack data structure in javascript. Stack organizes data into the sequential order. It similar to the stack of books in a library or stack of dishes in the kitchen...

0

Reverse a singly linked list

Problem description : Write a function to reverse a singly linked list. Input : A linked list Output : A linked list Logic : Iterate through linked list with three-pointers previous, current, next. While...

0

Closest pair of numbers

Problem description : Given a list of unsorted integers, find the pair of elements that have the smallest absolute difference between them? If there are multiple pairs, find them all and return them in...