There are N stations on route of a train. The train goes from station 0 to N-1. The ticket cost for all pair of stations (i, j) is given where j is greater than i. Find the minimum cost to reach the destination.

Read More »Write a function “runCustomerSimulation” that takes two inputs – an integer: total number of computers in a cafe and a string: a sequence of uppercase letters.

Read More »Given an integer x and a positive number y, write a function that computes xy under following conditions. a) Time complexity of the function should be O(Log y) b) Extra Space is O(1)

Read More »## Vertex Cover Problem | Set 2 (Dynamic Programming Solution for Tree)

Leave a comment | Filed under TreesA vertex cover of an undirected graph is a subset of its vertices such that for every edge (u, v) of the graph, either ‘u’ or ‘v’ is in vertex cover.

Read More »In C, we can specify size (in bits) of structure and union members. The idea is to use memory efficiently when we know that the value of a field or group of fields will never exceed a limit or is withing a small range.

Read More »Given a rectangular matrix which has only two possible values ‘X’ and ‘O’. The values ‘X’ always appear in form of rectangular islands and these islands are always row-wise and column-wise separated by at least one line of ‘O’s.

Read More »## Amazon Interview Experience | Set 178 (For SDE-1)

Leave a comment | Filed under Interview ExperiencesIn-house interview with Amazon Bangalore for SDE 1. Here’s my experience. Round 1: My first round was the HM round because no other panel members were free.

Read More »We are given a string having parenthesis like below “( ((X)) (((Y))) )” We need to find the maximum depth of balanced parenthesis, like 4 in above example. Since ‘Y’ is surrounded by 4 balanced parenthesis.

Read More »## Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’

Leave a comment | Filed under ArraysGiven an array of size n where all elements are in range from 0 to n-1, change contents of arr[] so that arr[i] = j is changed to arr[j] = i.

Read More »Hi everyone, Recently i had wonderful interview experience with Sap Labs India. I would like to share the interview experience with all the readers and hope it will help all of you in your preparation for SAP Labs.

Read More »## Microsoft interview Experience | Set 49 (For Internship)

Leave a comment | Filed under Interview ExperiencesRecently Microsoft visited our campus for SDE intern. The process took over 4 months. Round 1 (Online MCQ’s) time- 30 minutes.

Read More »Total 5 rounds: Cleared 3 and reached upto 4 round and then got rejected :(. 1st Round : 20 MCQ 45 mins with 1 min/2 min dedicated question wise.

Read More »I recently got an offer from CouponDunia, here is my interview experience: There were four rounds. Round 1: Coding Test on HackerRank. Three question in 90 minutes.

Read More »Online round (1 hour on hackerrank): 1. There are ‘n’ ticket windows in the railway station, ith window has ai tickets available.

Read More »