test an user registration page: username and password, username is an email address, password have a list of limitation
least 6 characters
at least one Capital character
1 number
1 low case
1 special character
test text box: (Country, unicode , utf-8, multi-line,
test number: ( 360-553-2098, phone number? ) need to be calculate, the range of number ,
how to evaluate the relation between developer and QA?
5.matrix (code, test cases, test plans)
1).valid test cases
2). invalid test cases
* a. data related vs non data related
* b. severity
* c. UI related or backend API
* d. module, domain,
// Java program to connect nodes at same level // NimbleRx coding question // Date: 2016-05-12// A binary tree nodeclassNode{intval;Nodeleft,right,next;Node(intitem){val=item;left=null;right=null;next=null;}}publicclassConnectedTree{staticNoderoot;// set the next of root and calls helper recursively for other nodesvoidconnectNodes(Nodep){p.next=null;// Set the next for root// recursively set the next for rest of the nodeshelper(p);}// set next of all descendants of p.publicvoidhelper(Nodep){if(p==null){return;}if(p.left!=null){p.left.next=p.right;}// set the next node for p's right childif(p.right!=null){if(p.next!=null){p.right.next=p.next.left;}else{p.right.next=null;// if p is the right most child at its// level}}// Set next for other nodeshelper(p.left);helper(p.right);}publicstaticvoidmain(Stringargs[]){ConnectedTreetree=newConnectedTree();tree.root=newNode(10);tree.root.left=newNode(8);tree.root.right=newNode(2);tree.root.left.left=newNode(1);tree.root.left.right=newNode(4);tree.root.right.left=newNode(7);tree.root.right.right=newNode(3);// set next nodes in all nodestree.connectNodes(root);// Let us check the values of next nodesSystem.out.println("Check the next node in the ConnecteTree ");System.out.println("Print -1 if there is no next node :\n");introotNext=root.next!=null?root.next.val:-1;System.out.println("next of "+root.val+" is "+rootNext);intleftNext=root.left.next!=null?root.left.next.val:-1;System.out.println("next of "+root.left.val+" is "+leftNext);intrightNext=root.right.next!=null?root.right.next.val:-1;System.out.println("next of "+root.right.val+" is "+rightNext);intleftLeftNext=root.left.left.next!=null?root.left.left.next.val:-1;System.out.println("next of "+root.left.left.val+" is "+leftLeftNext);//4intleftRightNext=root.left.right.next!=null?root.left.right.next.val:-1;System.out.println("next of "+root.right.right.val+" is "+leftRightNext);//7}}
第四个面试官
Duy (Head of Engineering) 14:00 - 14:40
The interviewer asked me to sum (Collection
1
2
3
4
5
6
7
8
9
10
11
Collection<Object>1.245“2.345"
List
HashMap<k, v>
Pojo {
person {
int id
String name
}
分两步做
How to deal with List, Set, Map, refer to Check if Object is instance of String, HashMap, or HashMap[ ]
obj.instanceOf();
How to deal with PoJO, refer to how to get fields from a pojo dynamically
You may use java reflection. For simplicity I assume your Employee calss only contains int field. But you can use the similar rules used here for getting float, double or long value.
He asked me introduce my projects and architecture. Also, asked me to introduce infrastructure of ELK (ElasticSearch, Logstash, Kibana)
Reference
Connect nodes at same level
Method 1 (Extend Level Order Traversal or BFS)
Consider the method 2 of Level Order Traversal. The method 2 can easily be extended to connect nodes of same level. We can augment queue entries to contain level of nodes also which is 0 for root, 1 for root’s children and so on. So a queue node will now contain a pointer to a tree node and an integer level. When we enqueue a node, we make sure that correct level value for node is being set in queue. To set nextRight, for every node N, we dequeue the next node from queue, if the level number of next node is same, we set the nextRight of N as address of the dequeued node, otherwise we set nextRight of N as NULL.
Time Complexity: O(n)
Method 2 (Extend Pre Order Traversal)
This approach works only for Complete Binary Trees. In this method we set nextRight in Pre Order fashion to make sure that the nextRight of parent is set before its children. When we are at node p, we set the nextRight of its left and right children. Since the tree is complete tree, nextRight of p’s left child (p->left->nextRight) will always be p’s right child, and nextRight of p’s right child (p->right->nextRight) will always be left child of p’s nextRight (if p is not the rightmost node at its level). If p is the rightmost node, then nextRight of p’s right child will be NULL.