interview questions
- Write a function that computes the N-th fibonacci number.
- Work in base 7: addition, multiplication, division.
- You are given a tree as a list of edges, each described as a line "<from> <to>" in the input file. You are also given a set of interesting nodes from the console (cin). Find a common parent of the interesting nodes that is as far as possible from the tree's root.
- Compare a linked list structure with an array. Example: ArrayList and LinkedList in Java.
- Implement remove_if
- Count the number of set bits in a 32b integer. Optimize for time/space.
- Implement next_permutation.
- Print the data in a binary tree level by level.
- Write a function that generates all subsets of a set. Now write a function that generates all subsets for which the product of elements is less than a limit. Optimize for speed.
- Compare two languages.
- When should a destructor be virtual in C++? What is a "virtual constructor"?
No comments:
Post a Comment
Note: (1) You need to have third-party cookies enabled in order to comment on Blogger. (2) Better to copy your comment before hitting publish/preview. Blogger sometimes eats comments on the first try, but the second works. Crazy Blogger.