# Category - c programming

## C Algorithm – Reverse a String using Stack

C Algorithm - Evaluation of Postfix Expression - Data Structure -Given a string, reverse it using stack. For example “GeeksQuiz” should be converted

## C Programming – Convert a BST to a Binary Tree such that sum of all greater keys is added to every key

Convert a BST to a Binary Tree such that sum of all greater keys is added to every key - Given a Binary Search Tree (BST), convert it to a Binary Tree.

## C Algorithm – Introduction to Stack

C Algorithm -Introduction to Stack - Data Structure -Stack is a linear data structure which follows a particular order in which the operations

## C Programming – Select a Random Node from a Singly Linked List

The idea is to use Reservoir Sampling. Following are the steps. This is a simpler version of Reservoir Sampling as we need to select only one key.

## C Programming – Randomized Algorithms (1/2) Approximate Median

It is quite easy to visualize this statement since the median which we report will be (k/2)th element and if we take k/2 elements from the left quarter.

## C Programming-Swap all odd and even bits

Given an unsigned integer, swap all odd bits with even bits. For example, if the given number is 23 (00010111), it should be converted to 43 (00101011).

## C Programming-Binary representation of a given number

C Programming - Binary representation of a given number - Bit Algorithm - Write a program to print Binary representation of a given number.

## C Program to find whether a no is power of two

C Program to find whether a no is power of two - Bit Algorithm - Given a positive integer, write a function to find if it is a power of two or not.

## C Programming – Find if there is a path between two vertices in a directed graph

C Programming - Find if there is a path between two vertices in a directed graph - check whether there is a path from the first given vertex to second.

## C Programming – Matrix Chain Multiplication

C Programming - Matrix Chain Multiplication - Dynamic Programming MCM is an optimization problem that can be solved using dynamic programming.