Multiply Two Numbers without using * (Multiplication Operator)

Write a C program to multiply two numbers without using * multiplication operator.

Given two numbers, both numbers are positive.  Write a program to multiply two numbers without using * multiplication operator.  Think for a moment how to solve this problem .

You can use multiple approaches to find the solution of a problem.

C Program to Multiply Two Numbers without using *

C Program to Multiply Two Numbers without using *

Reverse a Linked List using Recursion

Write a program to reverse a linked list using recursion. Given a linked list print them in reverse order using recursion. This question is mostly asked in interviews.

In my last post, I have explained how to reverse a linked list using an iterative approach. In this post, We will learn how to reverse a linked list using recursion.  The time complexity for both iterative and recursive approach is O(n).

MCQ on Recursion – Recursion Objective Questions for Practice

MCQ on Recursion

Recursion is the most important concept in computer science. In my previous posts, i have written about binary search implementation using recursion and difference between recursion and iteration.

These MCQ helps you to understand the concept of Recursion.

1) Which Data Structure is used to perform Recursion?

a) Queue
b) Stack
c) Linked List
D) Tree

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)). 

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, We’ll learn about stack data structure and it’s implementation using an array.

C Program to Implement a Stack using Linked List

What is a Stack in 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.