## C Program to Reverse a String using Stack, Pointers, Recursion & Swap

Write a c program to reverse a string without using strrev function. Given an input string, we have to write a method to reverse a string. In c, you can simply reverse a string using an inbuilt strrev() function. But we don’t have to use this method.

Think how do you solve this problem. In this tutorial, we write a c code to reverse a string using stack, pointers, recursion, loop.

## Binary Search Program, Algorithm & their Time Complexity

Binary Search Program, Algorithm & their Time Complexity. In this tutorial, You’ll learn about binary search algorithm, how it’s useful in searching and the time complexity of a binary search.

## Binary Search

A Binary Search is used to search an element in a sorted array.  Binary search is also known as half-interval search or logarithmic search. It works by comparing a value (value needs to search) to the middle element an array. If a value matches with the middle element then the position is returned otherwise the algorithm repeats if the value is less than or greater than the middle element.

A Binary search algorithm is efficient than the linear search algorithm. The time complexity of binary search is O(log(n)).

## Find Pair of Elements in an Array whose Sum is Equal to a given number

Find Pair of Elements in an Array whose Sum is Equal to given number.  Given an array of n integers and a number x, We have to write a code to find a pair of elements(a,b) in an array whose sum is equal to a given number x.

## C Program to Count Number of Words in a String

Write a C program to count number of words in a string. Given an input string, we have to write a code to count number of words in a string. The words in a string are separated by space(‘ ‘).

## Program to Print Middle Element of a Linked List

Write a program to print middle element of a linked list. It is also the most asked question in interviews.  I assume you have a basic understanding of linked list and it’s concept.

## Program to Swap Two Numbers Using Bitwise XOR Operator

Swapping two numbers using Bitwise XOR operator is tricky one and it’s generally asked in interviews. There are other two methods also through which you can swap two numbers.

## Stack Program in C using an Array – Stack Tutorial Part – I

Write a stack program in C using an array. Implement a stack data structure using an Array. In this tutorial, You are going to learn about stack data structure and it’s implementation in C using an array.

C Program to Implement a Stack using Linked List

## What is a Stack Data Structure?

A Stack is a Data Structure, in which insertion and deletion operations are allowed only at one end. It worked on LIFO (Last In First Out) Principle. In LIFO, an element which inserted last must be the first element to be removed.

## C Program to Reverse a Singly Linked List using Iteration

Write a C program to reverse a singly linked list. Given a linked list, write a method to reverse a singly linked list. In this tutorial, we are going to write a code to reverse a linked list using an iterative approach.