Tag Archives: interview preparation

HR questions

1. What was the last most technically challenging thing you did in your project?
2. Mention some improvements that were suggested by your manager in past.
3. What would be one thing that you will change in your previous project?
4. What motivates you to work daily?
5. Describe a time when you encountered a production bug and how did you solve it? What was your role?
6. Did anytime you work overtime for getting things done?
7. Let us assume that production ETL started to fail. How would you proceed?
8. How does a typical day starts in your job?
9. What blogs do you follow for SQL?
10. What latest technology news did you follow? Anything apart from BI field?
11. How long is your notice period?
12. Do you prefer researching a lot or work so that customer gets satisfied?

Advertisements

Leave a comment

Filed under Uncategorized

Amazon interview preparation

Tree formation:

class Node
{
public:
  Node(value) { nValue = value; pLeft = pRight = NULL; }

  Node* pLeft;
  Node* pRight;
  int nValue;  // or any other data
}

class Tree
{
public:
  Node* pRoot;
  Tree() { pRoot = NULL; }

  Node* search(int value); //...
  void createLeaf(int value); //...
  // ...
}

Geeks for geeks (Update: Feb 15, 2013)

http://www.geeksforgeeks.org/find-the-minimum-distance-between-two-numbers/

http://www.geeksforgeeks.org/minimum-number-of-jumps-to-reach-end-of-a-given-array/

http://www.geeksforgeeks.org/check-if-each-internal-node-of-a-bst-has-exactly-one-child/

http://www.geeksforgeeks.org/majority-element/

http://www.geeksforgeeks.org/search-in-row-wise-and-column-wise-sorted-matrix/

http://www.geeksforgeeks.org/given-an-array-arr-find-the-maximum-j-i-such-that-arrj-arri/

LeetCode must read problems:

http://www.leetcode.com/2010/04/how-to-determine-if-point-is-inside.html

http://www.leetcode.com/2010/04/rotating-array-in-place.html

http://www.leetcode.com/2010/09/fun-with-bit-operations.html

http://www.leetcode.com/2010/09/number-of-1-bits.html

http://www.leetcode.com/2010/09/printing-binary-tree-in-level-order.html [Done]

http://www.leetcode.com/2010/09/determine-if-binary-tree-is-binary.html [Done]

http://www.leetcode.com/2010/09/printing-binary-tree-in-zig-zag-level_18.html [Done]

http://www.leetcode.com/2010/10/print-edge-nodes-boundary-of-binary.html [Done]

http://www.leetcode.com/2010/11/stack-that-supports-push-pop-and-getmin.html

http://www.leetcode.com/2010/11/largest-binary-search-tree-bst-in_22.html [Done]

http://www.leetcode.com/2011/01/find-k-th-smallest-element-in-union-of.html

http://www.leetcode.com/2011/04/construct-binary-tree-from-inorder-and-preorder-postorder-traversal.html [Done]

http://www.leetcode.com/2011/05/determine-if-two-rectangles-overlap.html

http://www.leetcode.com/2011/07/lowest-common-ancestor-of-a-binary-tree-part-ii.html [Done]

http://www.leetcode.com/2011/08/reverse-bits.html
GeeksForGeeks data structure link:

http://www.geeksforgeeks.org/forum/tags/data-structures
Cool questions:

http://www.geeksforgeeks.org/forum/topic/given-inorder-and-postorder-traversals-construct-a-binary-tree [Done]

http://www.geeksforgeeks.org/archives/category/linked-list

Diameter of tree: http://www.geeksforgeeks.org/archives/5687 [Done]

Three way partitioning: ( low and high are the numbers you want to partition by. p and q are regular quick sort counters. Check anything lower than low and swap it with the number placed at p and increment p, parallely, check anything more than high and swap it with the number placed at q and decrement q

void threeWayPartition(int data[], int size, int low, int high) {
  int p = -1;
  int q = size;
  for (int i = 0; i < q;) {
    if (data[i] < low) {
      swap(data[i], data[++p]);
      ++i;
    } else if (data[i] >= high) {
      swap(data[i], data[--q]);
    } else {
      ++i;
    }
  }
}

2 way partitioning:

Low = 0 , High = n-1
A[low] = 0.. Lo++, 1.. A[lo]><A[high] & low++ & high--

3 way partitioning:

Low = 0, Mid = 0, High = n-1
A[mid] = 0.. a[low]><A[mid] & low++ & mid++, 1.. mid++, 2.. a[mid]><a[high] & mid++ & high--

1 Comment

October 20, 2012 · 10:28 am