Some Idea, Project and Programming Notes

  • Home
  • About

Algorithm

QuickSort: Partition an Array into Sub-array

April 3, 2016IsonProjects Leave a comment

We already know we have to divide an array into two sub-array for quicksort algorithm. Here I’ll describe how this partitioning actually works. If you want to know about how quicksort works, follow my other post on quicksort working principle. I followed Introduction to Algorithms, 3rd Edition (MIT Press) for writing this tutorial.

Algorithmalgorithm, programming

QuickSort Algorithm Working Principle

April 3, 2016IsonProjects Leave a comment

QuickSort is the most elegant sorting algorithm with an average case time complexity of O(nlogn). The main idea behind quick sort is divide and conquer. I’ll try to explain how this divide and conquer strategy works for quick sort. This writing is a gist from Introduction to Algorithms, 3rd Edition (MIT Press), a cool book for … Continued

Algorithmalgorithm, programming

Integer Pair With Given Sum From an Array

April 3, 2016IsonProjects Leave a comment

Finding an integer pair with given sum is a very familiar problem in algorithm community. The general problem is: given an array of integer numbers and a given sum, how do we find out a integer pair with given sum?

Algorithmalgorithm, programming

Detect Loop in Linked List

April 1, 2016IsonProjects Leave a comment

People follow many approaches to detect loop in linked list. Here I’m going to discuss about two approaches. Both approaches can be used on a singly linked list or doubly linked list.

Algorithmalgorithm

Categories