Given an array of n integers, find the third largest element. All the elements in the array are distinct integers. Example : Input: arr[] = {1,… Read More
Dell recently did an on-campus hiring at my University. The 1st round was the Aptitude test which was conducted online. It had 15 questions from… Read More
I was recently interviewed for the position of SDE-1 at Amazon. It was a 3 round process: Round 1: On paper coding: Given a binary… Read More
Python in its definition provides certain methods to perform faster decimal floating point arithmetic using the module “decimal”. Important operations on Decimals1. sqrt() :- This function… Read More
Write a program that takes number and gives the resulting palindrome (if one exists). If it took more than 1, 000 iterations (additions) or yield… Read More
Given an array of integers arr[], The task is to find all its subsets. The subset can not contain duplicate elements, so any repeated subset… Read More
Given two strings, find the number of times the second string occurs in the first string, whether continuous or discontinuous. Examples: Input: string a =… Read More
This tutorial assumes you have a basic knowledge of socket programming, i.e you are familiar with basic server and client model. In the basic model,… Read More
I got call from consultancy for Amazon. After profile shortlisting, i received online test and then had telecom interview. After I went to Pune for… Read More
Multiple Inheritance is a feature of an object-oriented concept, where a class can inherit properties of more than one parent class. The problem occurs when… Read More
Given a balanced expression, find if it contains duplicate parenthesis or not. A set of parenthesis are duplicate if the same subexpression is surrounded by… Read More
Given an array of integers, find the most occurring element of the array and return any one of its indexes randomly with equal probability.Examples: Input:… Read More
Given a range [n,m], find the number of elements that have odd number of factors in the given range (n and m inclusive). Examples: Input… Read More
Given a range [n, m], find the number of elements that have odd number of factors in the given range (n and m inclusive). Examples:… Read More
Given a range [n, m], find the number of elements that have odd number of factors in the given range (n and m inclusive). Examples:… Read More