Skip to content
All Basic Articles
A variable in simple terms is a storage place which has some memory allocated to it. Basically, a variable used to store some form of… Read More
Union  Union of the sets A and B, denoted by A ∪ B, is the set of distinct elements that belong to set A or… Read More
A Set is an unordered collection of objects, known as elements or members of the set. An element ‘a’ belong to a set A can… Read More
Sizeof is a much used operator in the C or C++. It is a compile time unary operator which can be used to compute the… Read More
A function is a set of statements that take inputs, do some specific computation and produces output. The idea is to put some commonly or… Read More
Given a string, remove all spaces from the string and return it. Input: "g eeks for ge eeks " Output: "geeksforgeeks" Expected time complexity is… Read More
There are 3 ants sitting on three corners of a triangle. All ants randomly pick a direction and start moving along edge of the triangle.… Read More
Given an unsorted of distinct integers, find the largest pair sum in it. For example, the largest pair sum in {12, 34, 10, 6, 40}… Read More
1. Machine Coding: Two players, two field; and have multiple ships located in their fields. They are guessing each others ship position and hitting. Tell… Read More
We have introduced arrays in set 1 (Introduction to arrays in C). In this post array properties in C are discussed. 1) In C, it… Read More
Hope you liked my previous post “Top 25 Interview Questions”. Here comes the next 10. 1) Design discussion on elevator. Hint: Ask questions related to… Read More
  An array in C/C++ or be it in any programming language is a collection of similar data items stored at contiguous memory locations and… Read More
In C, it is possible to have array of all types except following. 1) void. 2) functions. For example, below program throws compiler error int… Read More
  We have discussed Introduction to Binary Tree in set 1 and Properties of Binary Tree in Set 2. In this post, common types of… Read More
We have discussed Introduction to Binary Tree in set 1. In this post, the properties of a binary tree are discussed.  1) The maximum number… Read More
The interview was scheduled after I passed the coding challenge. The coding challenge was kinda simple, it was a grid, with each cell connected to… Read More
Given an array of integers, update every element with multiplication of previous and next elements with following exceptions. a) First element is replaced by multiplication of… Read More
I had a total of 5 rounds.Initially I thought there will be only 3 rounds. Round 1: 1. Rotate a matrix by 90 degrees clockwise.(… Read More
Telephonic Round – 1: 1) Inversion count in an array – https://www.geeksforgeeks.org/counting-inversions/ 2) Iterative pre order traversal. Telephonic Round – 2: 1) Given an array… Read More
Given a Binary Tree and a key to be searched in it, write an iterative method that returns true if key is present in Binary… Read More