Sunday, 10 June 2018

Amazon Senior SDE Interview Experience

Amazon Senior SDE Interview Experience


Written Test - 3 questions
Q1 Maximum Contiguous Sum Subarray

Q2 Rope Length

Q3 Left View of  a Tree


Interview - Round 1
Q1 Dutch National Flag Problem

Q2 Suggest a data structure for stocks buy and sell where sellers can add stock to sell and you can match a buyer with the best bid.

Sunday, 13 May 2018

Microsoft SWE hackerrank questions

Microsoft SWE hackerrank questions


Q1 Given the preorder and inorder traversal of binary tree, find the postorder traversal

INPUT
preorder -> 37, 41, 43, 13, 5, 11, 29, 23, 2, 17, 47, 7, 3, 19, 31
inorder -> 13, 5, 43, 11, 41, 2, 23, 17, 29, 47, 37, 3, 7, 31, 19

Pick one of the choices
A) 5,13,11,43,2,17,23,47,29,41,31,19,7,3,37
B) 5,13,11,43,2,17,23,47,29,41,3,31,19, 7,37
C) 5,13,11,43,47,29,2,17,23,41,3,31,19, 7,37
D) 5,13,11,2,17,23,43,47,29,41,3,31,19, 7,37

Q2 Select the function with highest asymptotic complexity
A) f1(n) = n^0.999999 logn
B) f2(n) = 10000000n
C) f(n) = n^2
D) f3(n) = 1.000001^n

Q3 Calculate the complexity to merge sorted arrays of size k1, k2, k3 ... kn
for e.g.
k1 = 2,5
k2 = 1,4,8
k3 = 3
find complexity to merge k1, k2 and k3. the resulting array will be: R = 1,2,3,4,5,8

A) (k1 + k2 + ... + kn) * n 
B) n * k1 * k2 * k3 * ... * kn
C) (k1 + k2 + ... + kn) * log2n
D) n2

Q4 Sort a integer singly linked of size n in batches of k nodes
Given singly linked list of integers of size n, sort the linked list in increasing order in batches of k nodes.
For e.g. the input singly linked list, L = 4 -> 8 -> 3 -> 9 -> 1 -> 3 -> null and batch of k nodes= 3
Please note that in above e.g. 4->8->3 is first batch of k(3) nodes and 9-> 1->3 is second batch of k(3) nodes.
The output of your function should be: 3 -> 4 -> 8 -> 1 -> 3 -> 9 -> null

Q5 Calculate the count of Combinations given a collection of size n and you need to choose k items from the collection
Given a collection of items of size n, you need to find total count of combinations to select k items from the collection. The formula to calculate the combination is:
nCr = n! / (n-r)! * r!
For e.g. if collection size is. 100 and items to select are 2, then choose k is (100 * 99)/(2 * 1) = 4950

Hit like if these questions help you...!!!

Saturday, 20 January 2018

Top cloud mining website for passive income

Cryptocurrency Cloud Mining

A new trend has been started where a lot of new cloud mining companies have emerged out. 
A number of companies offer “cloud mining” for Bitcoin and other digital cryptocurrencies. Cloud mining is performed by a third party but you, the customer, buy some of their mining capacity and you receive the revenue from that mining. The mining is done “in the cloud,” which means that you buy into an existing or new mining project and you enjoy hassle-free revenue.

Here I am listing the top website of cloud mining which have a good reputation of payouts and which can easily 2x your investment in an year based on the type of contract.