Skip to content

Category Archives: Mathematical

GCD (Greatest Common Divisor) or HCF (Highest Common Factor) of two numbers is the largest number that divides both of them.  For example, GCD of… Read More
Given two matrices, the task is to multiply them. Matrices can either be square or rectangular: Examples:  (Square Matrix Multiplication) Input: mat1[m][n] = { {1,… Read More
Given an integer n, write a function that returns count of trailing zeroes in n!. Examples :  Input: n = 5 Output: 1 Factorial of 5… Read More
Catalan numbers are defined as a mathematical sequence that consists of positive integers, which can be used to find the number of possibilities of various… Read More
Given a keypad as shown in the diagram, and an n digit number, list all words which are possible by pressing these numbers. Before the… Read More
Online Coding Round: Find if a given string contains duplicates Given a BST, find the maximum N elements of the tree Given a BST, convert… Read More
Given an array arr[] of size n where every element is in the range from 0 to n-1. Rearrange the given array so that arr[i]… Read More
Given two rectangles, find if the given two rectangles overlap or not.Note that a rectangle can be represented by two coordinates, top left and bottom… Read More
Given two numbers, write a C program to swap the given numbers. Input : x = 10, y = 20; Output : x = 20,… Read More
  Given two variables, x, and y, swap two variables without using a third variable.  Method 1 (Using Arithmetic Operators)  The idea is to get… Read More
Given an array of integers, find sum of its elements.Examples :  Input : arr[] = {1, 2, 3}Output : 6Explanation: 1 + 2 + 3… Read More
The problem is to count all the possible paths from the top left to the bottom right of a M X N matrix with the… Read More
Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers.  Examples:  Input: n = 2 Output: 2… Read More
Given two integers, write a function to multiply them without using multiplication operator.There are many other ways to multiply two numbers (For example, see this).… Read More
Online Test on InterviewStreet: 18 MCQs (Normal C loop questions, networking, dbms, os, analytical) 2 Coding questions 1. Check if an undirected graph is a tree or not. 2.… Read More

Start Your Coding Journey Now!