## Combinations where every element appears twice and distance between appearances is equal to the value

Given a positive number n, we need to find all the combinations of 2*n elements such that every element from 1 to n appears exactly… Read More »

## Find a Fixed Point in an array with duplicates allowed

Given an array of n duplicates or distinct integers sorted in ascending order, write a function that returns a Fixed Point in the array, if… Read More »

## Ways to sum to N using array elements with repetition allowed

Given a set of m distinct positive integers and a value ‘N’. The problem is to count the total number of ways we can form… Read More »

## k-th smallest absolute difference of two elements in an array

We are given an array of size n containing positive integers. The absolute difference between values at indices i and j is |a[i] – a[j]|.… Read More »

## Performing Google Search using Python code

Let’s say you are working on a project that needs to do web scraping but you don’t know websites on which scraping is to be… Read More »

## Closest (or Next) smaller and greater numbers with same number of set bits

Given a positive integer n, print the next smallest and the previous largest number that have the same number of 1 bits in their binary… Read More »

## Cuemath Interview Experience | Set 1 (For Backend Engineer)

1) Technical Round (Skype): Print all palindromic substrings of the given string. In a given binary tree, find the size of the largest BST. 2)… Read More »

## Uber India Interview Experience | Set 1 (Off-Campus for SDE 1)

1) First I had a 90 minutes coding round with three questions: They had modified a few questions from SPOJ. I found these later on.… Read More »

## OYO Rooms Interview Experience | Set 5 (Off-Campus for SDE)

Written Test (1 hour and we had to write code on paper): Remove duplicates in sorted linked list You are given an array of non… Read More »

## 5 Different methods to find length of a string in C++

String is a sequence of characters or an array of characters. The declaration and definition of the string using an array of chars is similar to… Read More »

## Amazon Interview Experience | Set 351 (Off-Campus for SDE I)

1) Online test with MCQs on OS, DBMS, basic algo ds. Coding problem: Find a tour that visits all stations 2) Telephonic Round 1 Find… Read More »

## Bool data type in C++

The ISO/ANSI C++ Standard has added certain new data types to the original C++ specifications.They are provided to provide better control in certain situations as… Read More »

## Output of python program | Set 11(Lists)

Pre-requisite: List in python 1) What is the output of the following program? filter_none edit close play_arrow link brightness_4 code data = [2, 3, 9]… Read More »

## Output of Python programs | Set 10 (Exception Handling)

Pre-requisite: Exception Handling in Python Note: All the programs run on python version 3 and above. 1) What is the output of the following program?… Read More »

## Output of Java program | Set 23 (Inheritance)

Prerequisite: Inheritance in Java 1) What is the output of the following program? filter_none edit close play_arrow link brightness_4 code public class A extends B… Read More »