Let us start with the heapsort algorithm:
int heap_size = n; build_maxheap(Arr);
for(int i = n; i >= 2 ; i--)
heap_size = heap_size - 1;
heapify(Arr, 1, heap_size);
The build_maxheap() funnction has a standard implementation of O(n). The important part of…
Given two queues with their standard operations (
size), implement a stack with its standard operations (
There can be two ways you can solve the above problem.
Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. It works best on a nearly sorted list. It has the following characteristics
Data Structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. They can be broadly classified as primitive, composite/abstract/non-primitive data structures. Primitive structures are the basic units of storage like boolean, integer, float, double. These are not that significant when…
Most of us know about existence of various OS (Operating Systems) like Linux, Windows 7/8, Mac OS. Apart from the fact that they are coming from different vendors, they are built for different purposes. Lets try to analyze it in this post. …
If you use anything other than the most basic English text, people may not be able to read the content you create unless you say what character encoding you used.
For example, you may intend the text to look like this:
MIPS R2000 is a RISC processor. Its ISA has fixed-width 32 bit instructions and fall into one of the following three categories: R-type, I-type, and J-type
All the Instructions — can also be grouped under following functional groups.
Arithmetic Instructions: +, -, *, / operations on std data-structures (short, int…
Most of the system programmer used the Timer Interrupt for various reasons especially in synchronization. Some of the including me didn’t spent much time on how exactly it works. This post is my attempt to explain my understanding on how it works?
Most of the IBM compatible PCs come with…
Have you ever wondered how exactly computer does all the tasks from browsing, playing games, videos, editing documents, etc… By Computers I mean every thing from mobile phones, laptops to Dedicated server class machines and even world fastest super computers. All most all of them work on same basic design…