## C/C++ Program for Odd-Even Sort / Brick Sort

This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements… Read More »

- Difference between const int*, const int * const, and int const *
- C program to store Student records as Structures and Sort them by Name
- Program to copy the contents of one array into another in the reverse order
- Get/Set process resource limits in C
- C program to check if a given string is Keyword or not
- Building Expression tree from Prefix Expression
- C Program to Reverse Array of Strings
- Draw a moving car using computer graphics programming in C
- Interesting Infinite loop using characters in C
- Substring Reverse Pattern
- Program for conversion of 32 Bits Single Precision IEEE 754 Floating Point Representation
- Sum of integers upto N with given unit digit
- Check whether the given character is in upper case, lower case or non alphabetic character
- Lex Program to check valid email
- Check whether the number can be made perfect square after adding 1
- Lex Program to accept a valid integer and float value
- TCS Coding Practice Question | Check Palindrome Number
- Program for IP forwarding table lookup
- First X vowels from a string
- TCS Coding Practice Question | Palindrome String
- Else without IF and L-Value Required Error in C
- Lex program to find the length of the longest word
- TCS Coding Practice Question | Reverse a String
- How to get the current position of cursor from output screen in C?
- Lex Program to accept string starting with vowel
- Lex Program to remove comments from C program
- TCS Coding Practice Question | Reverse a Number
- Lex Program to print the total characters, white spaces, tabs in the given input file
- Lex program to check perfect numbers
- Lex program to check whether input number is odd or even

This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements… Read More »

Given a number “n”, find its total number of divisors is even or odd. Examples : Input : n = 10 Output : Even Input:… Read More »

Given a positive integer, check if the number is prime or not. A prime is a natural number greater than 1 that has no positive… Read More »

Given a value V, if we want to make change for V Rs, and we have infinite supply of each of the denominations in Indian… Read More »

GCD of two numbers is the largest number that divides both of them. A simple way to find GCD is to factorize both numbers and… Read More »

Following is a typical recursive implementation of Merge Sort that uses last element as pivot. filter_none edit close play_arrow link brightness_4 code /* Recursive C… Read More »

Given two sorted arrays and a number x, find the pair whose sum is closest to x and the pair has an element from each… Read More »

There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs… Read More »

We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the… Read More »

Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or… Read More »

Given a positive integer N, count all possible distinct binary strings of length N such that there are no consecutive 1’s. Examples: Input: N =… Read More »

Area of a circle can simply be evaluated using following formula. Area = pi * r2 where r is radius of circle filter_none edit close… Read More »

Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing… Read More »

Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is… Read More »