yeasir007

Tuesday, January 30, 2018

undefined 201

Insertion Sort

Insertion Sort
Insertion sort removes one element from the input data, finds the location it belongs within the sorted list, and inserts it there in each iteration. It repeats until no input elements remain. It always maintains a sorted sub list in the lower position of the list. Time Complexity of this algorithm is O(n*n) Insertion...
undefined 201

Recursion

Recursion
What is recursion?  Sometimes a problem is too difficult or too complex to solve because it is too big. If the problem can be broken down into smaller versions of itself, we may be able to find a way to solve one of these smaller versions and then be able to build up to a solution to the entire problem. This is...
undefined 201

Implement Graph without STL in C++/Java

Implement Graph without STL in C++/Java
A graph is a data structure which is a pictorial representation of a set of objects where pairs of objects are connected by links. [problem] Print the vertices that are adjacent to the given vertex in query. [Input] The first line contains the number of vertices V, the number of edges E and the number of queries Q. From...
undefined 201

Implement Tree without STL in C++/JAVA

Implement Tree without STL in C++/JAVA
[problem] Construct a tree with the given input and traverse the tree in preorder. Then, print the visited node numbers. [Input] The first input line contains the number of total test cases, T. The next line contains the number of total nodes, N and the number of edges, E. On the following line, the edges will be given. The...
undefined 201

Implement Link List without STL in C++/JAVA

Implement Link List without STL in C++/JAVA
Linked list is a linear collection of data elements pointing to the next node by means of a pointer. It is a data structure consisting of a group of nodes which together represent a sequence. [Problem] Insert the given N integers to a linked list. Print the remainder after 1. removing the first number pointed 2. removing...
undefined 201

Implement Priority Queue without STL in C++/Java

Implement Priority  Queue without STL in C++/Java
A priority Queue is a data structure where each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. [problem] Store the given N (2 <= N <= 100) numbers into a priority queue, then print from the highest to the lowest priority...

Tuesday, January 02, 2018

undefined 201

Implement Hash without STL in C++ and Java Language:

Implement Hash without STL in C++ and Java Language:
A hash table (hash map) is a data structure used to implement an associative array, a structure that can map keys to values. Hash table uses a hash function to compute an index searching into an array of buckets or slots. [problem] Store the given N key and data pairs into a hash table, then print each data matching...
Page 1 of 7123457Next