data structure

A data structure is a particular way of organizing data in a computer so that it can be used effectively.

Some Sorting Algorithm

  • Bubble Sort: repeatedly swapping the adjacent elements if they are in wrong order
  • Selection Sort: sort algorithm sorts an array by repeatedly finding the minimum element
  • Insertion Sort: Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands
  • Quick Sort:Divide and Conquer algorithm. It picks an element as pivot
  • Merge Sort: It divides input array in two halves, calls itself for the two halves and then merges the two sorted halves.

What is DS?

tech picture

In computer science, a data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data Data structures are generally based on the ability of a computer to fetch and store data at any place in its memory, specified by a pointer—a bit string, representing a memory address, that can be itself stored in memory and manipulated by the program. Thus, the array and record data structures are based on computing the addresses of data items with arithmetic operations, while the linked data structures are based on storing addresses of data items within the structure itself. The implementation of a data structure usually requires writing a set of procedures that create and manipulate instances of that structure. The efficiency of a data structure cannot be analyzed separately from those operations. This observation motivates the theoretical concept of an abstract data type, a data structure that is defined indirectly by the operations that may be performed on it, and the mathematical properties of those operations (including their space and time cost)

Searching Algorithms

  • Binary Search
    time complexity O(Log n)
  • Jump Search
    time complexity ( O(n) - O(Log n) )
  • Linear Search
    time complexity O(n)
  • Interpolation Search
    time complexity O(√n)
  • Exponential Search
    time complexity O(Log n)
  • Fibonacci Search
    time complexity O(log(n))