1) Design the implementation and thread models for I/O completion ports. Remember to take into account multi-processor machines.
2) 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.
3) Write a function to print all of the permutations of a string.
4) Implement malloc.
5) Write a function to print the Fibonacci numbers.
6) 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.
7) How would you write qsort?
8) How would you print out the data in a binary tree, level by level, starting at the top?
Collection and sharing of, interview questions and answers asked in various interviews, faqs and articles.....
Showing posts with label Core programming. Show all posts
Showing posts with label Core programming. Show all posts
Core programming Questions-3
1) Multiple by 8 without using multiplication or addition. Now do the same with 7.
2) Write routines to read and write a bounded buffer.
3) Write routines to manage a heap using an existing array.
4) Implement an algorithm to take an array and return one with only unique elements in it.
5) 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. 6) Implement an algorithm to print out all files below a given root node.
7) How would you find a cycle in a linked list?
8) Give me an algorithm to shuffle a deck of cards, given that the cards are stored in an array of ints.
2) Write routines to read and write a bounded buffer.
3) Write routines to manage a heap using an existing array.
4) Implement an algorithm to take an array and return one with only unique elements in it.
5) 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. 6) Implement an algorithm to print out all files below a given root node.
7) How would you find a cycle in a linked list?
8) Give me an algorithm to shuffle a deck of cards, given that the cards are stored in an array of ints.
Core programming Questions-2
) Reverse a string. Optimize for speed. Optimize for space.
2) Reverse the words in a sentence, i.e. "I am Christina" becomes "Christina am I" Optimize for speed. Optimize for space.
3) Find a substring. Optimize for speed. Optimize for space.
4) Compare two strings using O(n) time with constant space.
5) Suppose you have an array of 1001 integers. The integers are in random order, but you know each of the integers is between 1 and 1000 (inclusive). In addition, each number appears only once in the array, except for one number, which occurs twice. Assume that you can access each element of the array only once. Describe an algorithm to find the repeated number. If you used auxiliary storage in your algorithm, can you find an algorithm that does not require it?
6) Count the number of set bits in a number. Now optimize for speed. Now optimize for size.
2) Reverse the words in a sentence, i.e. "I am Christina" becomes "Christina am I" Optimize for speed. Optimize for space.
3) Find a substring. Optimize for speed. Optimize for space.
4) Compare two strings using O(n) time with constant space.
5) Suppose you have an array of 1001 integers. The integers are in random order, but you know each of the integers is between 1 and 1000 (inclusive). In addition, each number appears only once in the array, except for one number, which occurs twice. Assume that you can access each element of the array only once. Describe an algorithm to find the repeated number. If you used auxiliary storage in your algorithm, can you find an algorithm that does not require it?
6) Count the number of set bits in a number. Now optimize for speed. Now optimize for size.
Core programming Questions-1
These questions are generally asked in positions where hard core programming skills are required.
The fact to remember is that a language ( C++, C#, Java etc ) and its syntax can be learnt rapidly but good programming skills and understanding and ability to create alogrithms is a base requirement.
This is why interviews for programming / coding positions in companies like Microsoft, Google, IBM etc are not language or technology based but demands core skills.
Here are some questions which were asked in these companies in recent times ( from input of hundreds of candidates attending these interviews) :
What's the difference between a linked list and an array?
Implement a linked list. Why did you pick the method you did?
Implement an algorithm to sort a linked list. Why did you pick the method you did?
Describe advantages and disadvantages of the various stock sorting algorithms.
Implement an algorithm to reverse a linked list. Now do it without recursion.
Implement an algorithm to insert a node into a circular linked list without traversing it.
Implement an algorithm to sort an array. Why did you pick the method you did?
Implement an algorithm to do wild card string matching.
Implement strstr()
The fact to remember is that a language ( C++, C#, Java etc ) and its syntax can be learnt rapidly but good programming skills and understanding and ability to create alogrithms is a base requirement.
This is why interviews for programming / coding positions in companies like Microsoft, Google, IBM etc are not language or technology based but demands core skills.
Here are some questions which were asked in these companies in recent times ( from input of hundreds of candidates attending these interviews) :
What's the difference between a linked list and an array?
Implement a linked list. Why did you pick the method you did?
Implement an algorithm to sort a linked list. Why did you pick the method you did?
Describe advantages and disadvantages of the various stock sorting algorithms.
Implement an algorithm to reverse a linked list. Now do it without recursion.
Implement an algorithm to insert a node into a circular linked list without traversing it.
Implement an algorithm to sort an array. Why did you pick the method you did?
Implement an algorithm to do wild card string matching.
Implement strstr()
Subscribe to:
Posts (Atom)