Skip to content

Category Archives: Algorithms

Following is a typical recursive implementation of Merge Sort that uses last element as pivot. Java // Recursive Java Program for merge sort    import… Read More
Following is a typical recursive implementation of Merge Sort that uses last element as pivot.  C /* Recursive C program for merge sort */ #include… Read More
Following is a typical recursive implementation of Merge Sort that uses last element as pivot. Python   Python # Recursive Python Program for merge sort… Read More
Given an array arr[] of distinct elements size N that is sorted and then around an unknown point, the task is to check if the… Read More
Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing… Read More
Given an array and a number ‘x’, write a function to delete ‘x’ from the given array. We assume that array maintains two things with… Read More
Write a function subtract(x, y) that returns x-y where x and y are integers. The function should not use any of the arithmetic operators (+,… Read More
Given a universe U of n elements, a collection of subsets of U say S = {S1, S2…,Sm} where every subset Si has an associated… Read More
Given n cities and distances between every pair of cities, select k cities to place warehouses (or ATMs or Cloud Server) such that the maximum… Read More
Written MCQ There were 20 multiple choice questions to be done in 30 minutes time and most of the technical questions were from https://www.geeksforgeeks.org/, one… Read More
There are 100 doors in a row, all doors are initially closed. A person walks through all doors multiple times and toggle (if open then… Read More
Recently Microsoft visited our campus for SDE intern. The process took over 4 months. Round 1 (Online MCQ’s) Time-30 mins This round consisted of 25… Read More
Given two dates, find total number of days between them. The count of days must be calculated in O(1) time and O(1) auxiliary space.  Examples: … Read More
Given an integer n, calculate the square of a number without using *, / and pow().  Examples :  Input: n = 5 Output: 25 Input:… Read More
Given n rectangular buildings in a 2-dimensional city, computes the skyline of these buildings, eliminating hidden lines. The main task is to view buildings from… Read More

Start Your Coding Journey Now!