Gave me a simple question of iterators
Sde Interview Questions
16,644 sde interview questions shared by candidates
Coding Round : 1. Array , count the inversions, write code for same. 2. Tree , print the left view of tree.
Reverse the linked list by recursion and iterative both
float calculateTaxes(income, brackets) where "brackets" is a list of pairs, e.g. [ [5000, 0], [10000, 0.1], [20000, 0.2], [10000, 0.3], [null, 0.4], ] This indicates that: The first $5K is untaxed The next $10K is taxed at 10% The next $20K is taxed at 20% The next $10K is taxed at 30% All income above this is taxed at 40% So, for an income of $55K, the tax would be $0K + $1K + $4K + $3K + $4K = $12K. Tax calculator leetcode
Can you explain what the pseudo-code below is trying to do? array[N] # array of N integers, indexed 0 to N-1; # assume it’s populated with [1,4,2,-2,-9,10,2,12,2,-4,-4,-4,-4,2,6,7] peak = array[0] index = 0 output = [] # array of tuples For x in 1..N-1 if (array[x]*array[x-1] > 0) if peak < 0 and array[x] < peak peak = array[x] index = x if peak >= 0 and array[x] > peak peak = array[x] index = x else output.insert( (index, peak) ) peak = array[x] index = x end if end for return output
1. find the missing number: 2, 9, 28, 65, __, 217, 344 2. Given a string s, find the length of the longest substring without repeating characters. 3. Find the middle point of a linked list. 4. Given an array arr of integers of size n. We need to compute the sum of elements from index i to j. The queries consisting of i and j index values will be executed multiple times (> 10^9 order0. 5. concepts of node js like promises, async javascript, let const, variable hoisting. 6. asked to write few mongodb queries.
Priority queue based common questions
2 Leetcode Medium questions in first interview
Array traversal inorder preorder and postorder and zigzag
Buy and sell stock problem and a variation of merge sort
Viewing 1671 - 1680 interview questions