Skip to content

Category Archives: Searching

Given an array representing heights of buildings. The array has buildings from left to right as shown in below diagram, count number of buildings facing… Read More
Given a string, remove the vowels from the string and print the string without vowels. Examples: Input : welcome to geeksforgeeks Output : wlcm t… Read More
Given two sorted arrays. There is only 1 difference between the arrays. The first array has one element extra added in between. Find the index… Read More
Technical Round-1 1. Maximum Subarray Sum problem: Different approaches and code 2. Given a 2-D char array, with random alphabets, find the word “INTUIT”, s/t… Read More
Three arrays of same size are given. Find a triplet such that maximum – minimum in that triplet is minimum of all the triplets. A… Read More
Prerequisites : BFS, DFS In BFS and DFS, when we are at a node, we can consider any of the adjacent as next node. So both… Read More
Given an array of strings. The array has both empty and non-empty strings. All non-empty strings are in sorted order. Empty strings can be present… Read More
Given a linked list and a key in it, the task is to move all occurrences of given key to end of linked list, keeping… Read More
In this post search, insert and delete operation in a sorted array is discussed. Recommended: Please solve it on “PRACTICE” first, before moving on to… Read More
In this post search, insert and delete operation in an unsorted array are discussed. Recommended: Please solve it on “PRACTICE” first, before moving on to… Read More
Given number of pages in n different books and m students. The books are arranged in ascending order of number of pages. Every student is… Read More
I have applied for Graphics Software Engineer position through LinkedIn. I was called for interview after 2 weeks of applying. Interview took place in Bangalore… Read More
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero. Examples :  Input : arr[] =… Read More
Given an array of distinct n integers. The task is to check whether reversing one sub-array make the array sorted or not. If the array… Read More
We have an array of integers and we have to find two such elements in the array such that sum of these two elements is… Read More