Category: Data Structure using C

  • Merge Sort is bad for Embedded System

    Merge sort is good if your system has plenty of memory to accommodate the temporary array. Embedded systems have very limited memory and it is often fixed. If the system has some other function that also runs concurrently. Then that memory also gets shortened. Merge sort is good for a bigger system like the personal…

  • Swapping of two numbers

    Before Swapping :a = 10b = 2 After Swapping:a = 2b = 10 To do the swapping we have different approaches. 1. Swapping using a temporary variable2. Swapping without using a temporary variable3. Swapping using pointers NOTE: We do not use of the second method in embedded system software writing. Because it would have to…

  • Stack implementation without pointer

    Stack is a type of data structure, where data is stored in Last In First Out fashion. In embedded system there are different kind of stacks available. They are implemented in hardware and software. The hardware implementation of stack is faster than software stack; but the size of stack in hardware is limited. There are…