Given an integer N, the task is to find an integer M formed by taking the rightmost set bit in N i.e. the only set… Read More »

Given a linked list which represents an integer number where every node is a digit if the represented integer. The task is to add a… Read More »

Pointers in Go programming language or Golang is a variable which is used to store the memory address of another variable. Pointers in Golang is… Read More »

Given a preorder sequence of the binary search tree of N nodes. The task is to find its leftmost and rightmost node. Examples: Input :… Read More »

Given a matrix mat[][] of size m * n which is sorted in row-wise fashion and an array row[], the task is to check if… Read More »

Given an array arr[] of N integers, the task is to sort the array without changing the position of negative numbers (if any) i.e. the… Read More »

Given an integer N and valid subsequences of an array of integers where every element is distinct and from the range [0, N – 1],… Read More »

Given an array arr[] of n integers. The task is to find the smallest perfect cube from the array. Print -1 if there is no… Read More »

Given an integer N and the sum of its divisors. The task is to find the sum of the inverse of the divisors of N.… Read More »

I attended the Amazon Recruitment drive for freshers in Bangalore. First 3 rounds were F2F pen-paper coding rounds of 45 mins each. Round 1: … Read More »

Given a linked list and an integer K, the task is to reverse every alternate K nodes. Examples: Input: 1 -> 2 -> 3 ->… Read More »

Dropdowns are one of the important components that are an integral part of any web application. Bootstrap provides its own interactive version of this component.… Read More »

Given an array of n distinct elements and a number x, arrange array elements according to the absolute difference with x, i. e., the element… Read More »

Given an array of size N and an integer K. The array consists of only digits {0, 1, 2, 3, …k-1}. The task is to… Read More »

Round 1: Written Round (pen and paper based) 1- Print binary tree in zig zag order 2- Design deck of cards with 52 cards and… Read More »

Given an integer N, the task is to find the Nth Mosaic number. A Mosaic number can be expressed as follows: If N = Aa… Read More »

Multi-line comments(comments block) are used for description of large text of code or comment out chunks of code at the time of debugging application. Does… Read More »

Given an integer N, the task is to print the first N terms of the Lower Wythoff sequence. Examples: Input: N = 5 Output: 1,… Read More »

Given an array arr[] of N integers, the task is to find the minimum deletions required such that frequency of arr[i] is exactly arr[i] in… Read More »

Given an array arr[] of N integers, the task is to find the minimum deletions required to make the GCD of the resulting array elements… Read More »