heap in data structures with examples
A heap is a tree-based data structure in which all the nodes of the tree are in a specific order.
For example, if X is the parent node of Y, then the value of X follows a specific order with respect to the value of Y and the same order will be followed across the tree. The maximum number of children of a node in a heap depends on the type of heap. However, in the more commonly-used heap type, there are at most 2 children of a node and it's known as a Binary heap. In binary heap, if the heap is a complete binary tree with N nodes, then it has smallest possible height which is log N to the base of 2.
Heaps can be of 2 types:
Max-Heap: In a Max-Heap the key present at the root node must be greatest among the keys present at all of it’s children. The same property must be recursively true for all sub-trees in that Binary Tree. Min-Heap: In a Min-Heap the key present at the root node must be minimum among the keys present at all of it’s children. The same property must be recursively true for all sub-trees in that Binary Tree.
lists in data structures with examples
A list is an ordered data structure with elements seprated by a comma and enclosed within square brackets.
For example:List 1 and List 2 here contains a single type of data:
List 1=[2,3,4,5,6]
List 2=['Python','is','Awesome']
Here,list 1 has integers while list 2 has strings.Lists can also store mixed data types as shown in lost 3
List 3=[1,'Python',2,'is',3'Awesome']
llosts in data structures and example
Hi,
A list in computer is an ordered data structure with a number of elements that are separated by a comma and are enclosed within square brackets . For example, list1 and list2 below contains a single type of data. Here, list1 has integers while list2 has strings. Lists can also store mixed data types as shown in the list3 here.
List 1- [1,2,3,4,5]
List 2- [ 'Python', 'Java', 'C++']
List 3- [1, 'Python', 2, 'Java', 3]
I hope this helps,
All the best
queus in data structures and example
A Queue is a linear structure which follows a particular order in which the operations are performed. The order is First In First Out (FIFO). An example of a queue is any queue of consumers for a resource where the consumer that came first is served first. The difference between stacks and queues is in removing. In a stack we remove the item the most recently added; in a queue, we remove the item the least recently added.
what are stacks in data structures
Dear,
Understanding of data structures is very important. Stacks, Queues, Linked Lists, Graphs are various Data Structures. Stack is kind of data structure which follows LIFO concept. LIFO basically means Last In First Out which means that the element that is added last into the stack will be popped out first. The elements are added from the beginning and deleted from the same end. A pile of books, a stack of dinner plates, a box of pringles potato chips can all be thought of examples of stacks. The basic operating principle is that last item you put in is first item you can take out. That is, that a stack is a Last In First Out (LIFO) structure.
Hope this helps!
c, data structures, python and SQL are enough to get a job?
Dear aspirant,
First of all you need to understand that nothing is enough in this world. You learn more you gain more. It's as simple as anything.
The skills that you have mentioned which are python, c , data structures and SQL is basically for data science profile. Although you can choose alternative path. But python and SQL play a major role in data analytice.
You can also choose the sde profile which is offered by the tech giants such as amazon, microsoft, wipro and other biggies. The software development skills are also one of those mentioned by you.
recursion in c language and data structures in c language
Dear Candidate,
Recursion is the process which comes into existence, when a function calls a copy of itself to work on a smaller problem. Any function which calls itself is called a recursive function, and such function calls are called recursive calls. Recursion involves several numbers of recursive calls. However, it is important to impose a termination condition of recursion. Recursion code is shorter than iterative code however it is difficult to understand.
Data Structures in C are used to store data in an organised and efficient manner. The C Programming language has many data structures like an array, stack, queue, linked list, tree, etc. A programmer selects an appropriate data structure and uses it according to their convenience.
If you want to know about Recursion and Data structures in brief, then you can use online resources for that. You can use You Tube, Udemy, Unacademy for that. Both, these are very important topics.
Hope this helps.
which is better between MAKAUT in house and NSHM kolkata for non-engeenering courses?
Hello aspirant,
Both are equal when compared with ratings...You can choose the one which suits you better in financial side,educational qualification,availability of transport etc..So,Kindly refer the links I provided here for further clarifications.
https://www.careers360.com/colleges/nshm-knowledge-campus-kolkat a
https://www.careers360.com/university/maulana-abul-kalam-azad-university-of-technology-kolkata
Hope this finds helpful...ALL THE BEST!!!