Description of heap
Provide a brief description of the term heap?
Expert
The heap is where malloc(), calloc(), and realloc() get memory.
Getting memory from the heap is much residual than getting it from the stack. On the other hand, the heap is much more portable than the stack. Memory can be assigned at any time and de-allocated in any order. Such memory is not de-allocated automatically; you have to call free().
Recursive data structures are almost always executed with memory from heap. Strings often come from there too, especially strings which could be very long at runtime. If you can keep data in a local variable (and allocate it from the stack), your code will run faster than if you put data on the heap. Sometimes you can employ a better algorithm if you use the heap faster, or more robust, or more flexible. It’s a tradeoff.
If memory is assigned from the heap, it’s available till the program ends. That's great if you remember to de-allocate it when you're done. If you forget, it's a problem. A memory leak is some allocated memory that's no longer required but is not de-allocated. If you have a memory leak inside a loop, you can use up all the memory on the heap and not be capable to get any more. (When that takes place, the allocation functions return a null pointer.) In some environments, if a program does not de-allocate everything it allocated, memory stays inaccessible even after the program ends.
Briefly describe the term B+ tree? Elucidate its uses?
Write a brief note on the term data structure? And also write down the types of data structures?
What is the way to implement of traversal of a binary tree?
Elucidate any two merits using Single linked list over doubly linked list and vice-versa?
What are the differences between Base case and Run-Time Stack?
Give a brief description of the term binary searching and Fibonacci search?
Write down a brief note on the term iterative algorithm?
Write down a brief note on the term Huffman algorithm?
Elucidate the terms Run-Time Stack, Binding Time, Recursive case, Base case and Tail Recursion?
Explain an Array is an Ivalue or not.
18,76,764
1960771 Asked
3,689
Active Tutors
1455172
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!