пятница, 27 сентября 2013 г.

CS test questions - part 1

I would like to share with you some experience in Computer Science test. There are a lot of sources to read of such tests but I will share some practical CS tests I met.
All serious CS tests involve good understanding of algorithms and data structures. Many of them imply university CS course and good experience. Some of the tests are relatively simple and application programmers should pass such test to be admitted true "programmers".

 

Level 1. Application Programmer

Explain Bubble sort and write numbers sort code
Explain BST
Write a function to reverse a string of characters (no API)

 

Level 2. Senior Application Programmer

Explain Bubble sort and write array numbers sort code
Explain BST data structure then write code to search for human names in the BST
(See also Level 1)

Level 3: Software Engineer

Explain 3 sort algorithms you know
Explain known way to store and search data with O(1) complexity. Explain pros and cons.
Explain an algorithm to sort 8 GB data file on 4 GB RAM system (the main idea is that the file doesn't fit into the system RAM)
Explain effective string search in large text
Write quick sort function for integers
Write effective code to reverse single linked list like A->B->C->D into D->C->B->A
Write effective code to permute a string like "abcd"
Write code to identify that the single linked list is a palindrome

Level 4: Senior Software Engineer, System Software Engineer

Explain AVL tree, write a function to insert an element into the AVL tree of numbers
Explain graph algorithms you know and their complexity
Explain all synchronization primitives and their cons and pros
Write effective code to identify that the single linked list is a palindrome
Write simple non-blocking "echo" TCP server
Write advanced search function with O(1) for human names