What is Graph Database? What is a data structure, How we will learn it? A basic introduction through Community Contribution by Harshith Kulal.

Home » Data Structure

# Category: Data Structure

→

Data structure is a blue print or design for storing/modifying related data.

there are many type of DS

Linked List

Array

Tree

Stack

Queue

Alexa has two stacks of non-negative integers, stack A=[a0,a1,…….am-1] and stack B=[b0,b1,…………bn-1] where index 0 denotes the top of the stack. Alexa challenges Nick to play the following game Game of Two Stacks Hackerrank : In each move, Nick can remove one integer from the top of either stack A or stack B. Nick keeps a running sum of the integers he removes from the two stacks. Nick is disqualified from the game if, at any point, his running sum becomes greater than some integer x given at the beginning …

In computer science, tree traversal (also known as tree search) is a form of graph traversal and refers to the process of visiting (checking and/or updating) each node in a tree data structure, exactly once.Here we are talking about Pre-order tree traversal, and we will also learn a problem of hackerrank related to it.

Queue using Two Stacks Hackerrank A queue is an abstract data type that maintains the order in which elements were added to it, allowing the oldest elements to be removed from the front and new elements to be added to the rear. This is called a First-In-First-Out (FIFO) data structure because the first element added to the queue (i.e., the one that has been waiting the longest) is always the first one to be removed. A basic queue has the …

Arrays – DS Hackerrank An array is a type of data structure that stores elements of the same type in a contiguous block of memory. In an array, A, of size N, each memory location has some unique index, i (where 0<=i<=N), that can be referenced as A[i] (you may also see it written as Ai). Given an array, …

Is This a Binary Search Tree? Hackerrank For the purposes of this challenge, we define a binary search tree to be a binary tree with the following ordering requirements: The data value of every node in a node’s left subtree is less than the data value of that node. The data value of every node in a node’s right subtree is greater than the data value of that node. Given the root node of a binary tree, can you determine …

BFS i.e Breadth First Search is very well known algorithm for traversing the graph or tree.