Featured Article

Minimax Algorithm in Game Theory | Set 4 (Alpha-Beta Pruning)

Prerequisites: Minimax Algorithm in Game Theory, Evaluation Function in Game Theory Alpha-Beta pruning is not actually a new algorithm, rather an optimization technique for minimax algorithm. It reduces the computation time by a huge factor. This allows us to search much faster and even go into deeper levels in the game tree. It cuts off… Read More »

Range LCM Queries

Given an array of integers, evaluate queries of the form LCM(l, r). There might be many queries, hence evaluate the queries efficiently. LCM (l, r) denotes the LCM of array elements that lie between the index l and r (inclusive of both indices) Mathematically, LCM(l, r) = LCM(arr[l], arr[l+1] , ……… , arr[r-1], arr[r]) Examples:… Read More »

Qualcomm Interview Experience | Set 4 (Intern + Full Time Employee)

Round 1 60 aptitude questions – I attempted around 48 (since negative marks were there…i didn’t attend those for which i had no idea)….and got through this round. Round 2 (Technical ) Introduction – about myself, educational background, project works, etc. Project – in and out; I was explaining and while explaining if the interviewer… Read More »

Abco Advisory Board Company | Set 1 (Internship + Full time Employee)

Started with 2 simple data structure programs and 30 aptitude questions; luckily cleared this round and qualified for the in-person interview. I was asked only data structure questions in both technical one and two. Longest sum contiguous sub array. I saw the solution to this question few days before the interview, but during the interview i… Read More »

Armstrong Numbers

Given a number x, determine whether the given number is Armstrong number or not. A positive integer of n digits is called an Armstrong number of order n (order is number of digits) if. abcd… = pow(a,n) + pow(b,n) + pow(c,n) + pow(d,n) + …. Example: Input : 153 Output : Yes 153 is an… Read More »

Concurrent Merge Sort in Shared Memory

Given a number ‘n’ and a n numbers, sort the numbers using Concurrent Merge Sort. (Hint: Try to use shmget, shmat system calls). Part1: The algorithm (HOW?) Recursively make two child processes, one for the left half, one of the right half. If the number of elements in the array for a process is less… Read More »

Stream In Java

Introduced in Java 8, the Stream API is used to process collections of objects. A stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result. The features of Java stream are – A stream is not a data structure instead it takes input from the Collections,… Read More »

Printing Longest Bitonic Subsequence

The Longest Bitonic Subsequence problem is to find the longest subsequence of a given sequence such that it is first increasing and then decreasing. A sequence, sorted in increasing order is considered Bitonic with the decreasing part as empty. Similarly, decreasing order sequence is considered Bitonic with the increasing part as empty. Examples: Input: [1,… Read More »

Amazon Interview Experience | Set 275 ( Off-Campus SDE-I Experienced)

I was interviewed in Delhi for SDE-I position in Kindle Frameworks Team at Amazon. I was working as a Project Lead in Samsung, Noida and had a total experience of 1 year 10 months in the Software Industry. Round 1 : Written Print Boundary Traversal of a Given Binary Tree – http://www.geeksforgeeks.org/boundary-traversal-of-binary-tree/ Add Two Numbers Represented… Read More »