## Binary Search Tree | Set 2 (Delete)

We have discussed BST search and insert operations. In this post, delete operation is discussed. When we delete a node, three possibilities arise. 1) Node… Read More »

## Binary Search

Given a sorted array arr[] of n elements, write a function to search a given element x in arr[]. A simple approach is to do… Read More »

## QuickSort

Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot.… Read More »

## Qualcomm Interview | Set 2

It was a very good experience to face interview at Qualcomm. I have attended the interview for a position of Embedded SW application developer and… Read More »

## Print Left View of a Binary Tree

Given a Binary Tree, print left view of it. Left view of a Binary Tree is set of nodes visible when tree is visited from… Read More »

## Merge Sort

Like QuickSort, Merge Sort is a Divide and Conquer algorithm. It divides input array in two halves, calls itself for the two halves and then… Read More »

## Qualcomm Interview | Set 1

Company : Qualcomm Position: Summer Intern(Software) Written Test It was an online MCQ test. Time limit was one hour. There were around 55 question. It… Read More »

## Sieve of Eratosthenes

Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number. Example: Input… Read More »

## Find whether an array is subset of another array | Added Method 3

Given two arrays: arr1[0..m-1] and arr2[0..n-1]. Find whether arr2[] is a subset of arr1[] or not. Both the arrays are not in sorted order. It… Read More »

## Naive algorithm for Pattern Searching

Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may… Read More »

## A program to check if a binary tree is BST or not

A binary search tree (BST) is a node based binary tree data structure which has the following properties. • The left subtree of a node… Read More »

## Find the two non-repeating elements in an array of repeating elements

Asked by SG Given an array in which all numbers except two are repeated once. (i.e. we have 2n+2 numbers and n numbers are occurring… Read More »

## Write a function to get the intersection point of two Linked Lists.

There are two singly linked lists in a system. By some programming error, the end node of one of the linked list got linked to… Read More »

## Count set bits in an integer

Write an efficient program to count number of 1s in binary representation of an integer. Examples : Input : n = 6 Output : 2… Read More »

## Write an Efficient C Program to Reverse Bits of a Number

Given an unsigned integer, reverse all bits of it and return the number with reversed bits. Input : n = 1 Output : 2147483648 On… Read More »