|
1. Implement a linked list. Why did you pick the method you did? 2. How would you find a cycle in a linked list? 3. Implement an algorithm to do wild card string matching. 4. Given an array of size n with first l positions filled with characters and a string s ,replace all the instances of ’%’ with this string s,given that the length of the array is sufficient to handle these substitutions. input output eg: abcdef%ghi%—— and “ppp” abcdefpppghippp 5. Implement malloc 6. How would you print out the data in a binary tree, level by level, starting at the top? 7. Design the implementation and thread models for I/O completion ports. Remember to take into account multi-processor machines. 8. Write a function to print the Fibonacci numbers. 9. Write a function to copy two strings, A and B. The last few bytes of string A overlap the first few bytes of string B. 10. Implement an algorithm that takes two strings as input, and returns the intersection of the two, with each letter represented at most once. Now speed it up. Now test it. 11. Write a function to print all of the permutations of a string. 12. Implement an algorithm to sort an array. Why did you pick the method you did? 13. Given that you are receiving samples from an instrument at a constant rate, and you have constant storage space, how would you design a storage algorithm that would allow me to get a representative readout of data, no matter when I looked at it? In other words, representative of the behavior of the system to date. 14. How would you write qsort? 15. Write a function that takes in a string parameter and checks to see whether or not it is an integer, and if it is then return the integer value. 16. Reverse the words in a sentence, i.e. "My name is Chris" becomes "Chris is name My." Optimize for speed. Optimize for space.
|