## Shell sort algorithm implementation in C

Shell Sort algorithm Shell sort is in-place comparison based sorting algorithm. it is also known as diminishing incremental sort. It is based on insertion sort algorithm which improves the time complexity...

## Reverse a Linked List using Recursion in C

Interview Question on link list Write a recessive function to reverse a singly linked list in c? some time interviewer at beginning level can ask this type of question to test...

## C/C++ program for Z algorithm string matching

Z Algorithm Z algorithm is a linear time string matching algorithm which runs in O(n) complexity. Many programmers are still not aware this algorithm. It is used to find all occurrence...

## string matching z algorithm

string matching problem Given a pattern P find all occurrence of P in text T. For example if P = “aba ” and T = “bbabayababay’ ,then P occurs in...

## Maximum subarray problem

Maximum subarray problem is to find the largest contiguous sub-array which has largest sum total. For example in array {-1,-2,3,4} the largest contiguous array which has largest sum is...

## longest palindromic substring

Longest palindrome sub-string problem is famous for software programmers specially for interview purpose. you can be questioned to write a function that returns the longest palindrome in a given string. A palindrome...

## Disjoint-set data structure c++ implementation

Disjoint-set data structure is very useful data structure which keeps track of collection of items and its set, i.e which item belongs to which set. it is also called...

## longest common substring problem

Longest common substring problem is one of famous problem in computer science.Experienced c/c++ programmer can face this type of problem. Given two or more strings ,find the longest common...

## 8 queens problem all solutions in c

Write a c program to print all solutions of 8 queens problem? Given a 8×8 matrix as a chess board, place 8 queens on the chess board such that...

## Reverse all words but not string

Write a program such that it reverse all words but not the string. for example it input string is “i love programing” then its output should be “i evol...