How to reverse a string, complexity of the problem in big O notation
Binary Tree Lowest Common Ancestor. “The following is a binary tree data structure in which each node is associated with an integer. Each node has a set of ancestors, recursively defined as: every node is its own ancestor, and the parent of an ancestor is also an ancestor. Any two nodes have a set of common ances- tors, defined as the set intersection of the two ancestor sets. Any two nodes have a lowest common ancestor, defined as their common ancestor farthest away from the root. Write in pseudo-code an O(n) function that takes a tree and two integers and returns the integer associated with the lowest common ancestor of the two nodes associated with the two inputs.” The interviewer wanted me to write the code
class Tree { Node *root; }
class Node { Node *left, *right; int value; }
int Tree::LCA(int a, int b) { // write code }
Here is the preorder traversal code.
The following metrics were computed from 1 interview experience for the Pocket Gems Mobile Game Engineer role in San Francisco, California.
Pocket Gems's interview process for their Mobile Game Engineer roles in San Francisco, California is extremely selective, failing the vast majority of engineers.
Candidates reported having very negative feelings for Pocket Gems's Mobile Game Engineer interview process in San Francisco, California.