First page
Next page
Q178: What is the purpose of the preprocessor directive #error?
tags: WindRiver software programming embedded
Q179: What does the following code output? <pre> void foo(void) { unsigned int a=6; int b=-20; (a+b >6) ? puts(">6") : puts("<=6"); } </pre>
tags: microsoft WindRiver software programming embedded
Q180: Write a progam to print a binary tree such that the root is printed in the middle of its left and right sub-trees.
tags: microsoft software programming C
Q181: What is the difference in memory management between Java and C++? Is it possible to create a memory leak in Java?
tags: ebay microsoft amazon software programming C java c++
Q191: Implement a queue in an array.
tags: Microsoft software c c++ programming
Q200: Design and describe a system/application that will most efficiently produce a report of the top 1 million Google search requests.These are the particulars. * You are given 12 servers to work with. They are all dual-processor machines with 4Gb of RAM, 4x400GB hard drives and networked together.(Basically, nothing more than high-end PC's) * The log data has already been cleaned for you. It consists of 100 Billion log lines, broken down into 12 320 GB files of 40-byte search terms per line. * You can use only custom written applications or available free open-source software.
tags: google sw software programming design algorithms
Q204: Given a string, with spaces, replace spaces with %20. You have extra space on the end of the string. (No additional memory and do it as close to O(n) as possible).
tags: microsoft software programming algorithm string
Q205: Write the 'grow' function for a C++ vector class
tags: microsoft software programming algorithm C++
Q208: Write a function to find the 2 biggest numbers in an array, and return the sum. How about the K biggest elements in the array, and return the sum. Do both in linear time.
tags: microsoft software programming algorithm
Q209: Write a function to find the next prime number after a given number.
tags: google microsoft software programming algorithm
Q210: From K sorted arrays, each of size N, how would you construct one big array, and what would the big-O of the procedure be? What if you only had memory of size 2N.
tags: google microsoft software programming algorithm
Q211: Find the nth node in an in-order search of a tree.
tags: google microsoft software programming algorithm
Q212: Find the intersection of 2 sorted integer arrays. What if one of them is huge? What if one of them is so huge, it can't fit in memory. How do you minimize the number of disk seeks?
tags: google microsoft software programming algorithm
Q213: How do you represnt a directed graph in a relational table?
tags: google microsoft software programming algorithm database sql
Q214: Given 2 strings (as character arrays) A and B, how would you determine if the characters in B were a subset of the characters in A.
tags: google microsoft software programming algorithm
Q215: Given that there are about 4 billion pages indexed by Google, how would you keep from indexing the same page twice?
tags: google microsoft software programming algorithm
Q216: How would you find out if a machine's stack grows up or down in memory?
tags: google software programming architecture
Q217: Implementation unbounded precision multiplication in C++.
tags: google software programming algorithm C++
Q218: Write Java vector add() by using C++ Templates
tags: google software programming algorithm C++ java
Q219: Given a set of KEY->VALUE pairs such that each KEY is unique, describe a method of storing these pairs on disk, and a method for accessing the corresponding VALUE given a KEY. Assume that RAM is fixed at 1gb and the set of pairs requires 40gb. HINT: we are trying to minimize page-transfers
tags: google software programming algorithm database
Q220: Given N computers networked together, with each computer storing N integers, describe a procedure for finding the median of all of the numbers. Assume that a computer can only hold O(N) integers (i.e. no computer can store all N^2 integers). Also assume that there exists a computer on the network without integers, that we can use to interface with the computers storing the integers.
tags: google software programming algorithm
Q221: Given the sequence S1 = {a,b,c,d,...,x,y,z,aa,ab,ac.... } and given that this sequence corresponds (term for term) to the sequence S2 = {1,2,3,4,....} Write code to convert an element of S1 to the corresponding element of S2. Write code to convert an element of S2 to the corresponding element of S1.
tags: google software programming algorithm
Q222: Given a binary tree with the following constraints: a) A node has either both a left and right child OR no children b) The right child of a node is either a leaf or NULL write code to invert this tree.
tags: google software programming algorithm
Q223: Given a square with side length = 1, describe all points inside square that are closer to the center of the square than to the edge of the square.
tags: google software programming algorithm
Q225: Given an array A[string], an array of strings where each string represents a word in a text document. Also given 3 search terms T1, T2, and T3 and 3 corresponding sorted sequences of integers S1, S2, and S3 where each integer in Si represents an index in A where search term Ti occured (i.e. S1, S2, and S3 contain the locations of the search terms in our array of words). Now find a minimal subarray of A that contains all of the search terms T1, T2, and T3. Extend this algorithm for an arbitrary number of search terms.
tags: google software programming algorithm
Q226: Design a data structure that supports push(), pop(), and min() all in O(1) timeDesign a data structure that supports push(), pop(), and min() all in O(1) time
tags: google software programming algorithm
Q228: What are the variable types in perl, how can you visually identify them in code?
tags: google software programming perl
Q239: Rank the functions in order of their asymptotic behaviour ( which is the greatest) 1. 2^n 2. n! 3. n^googol ( googol=10^100) 4. n^n
tags: google software math
Q240: you have n resources and n threads .. what protocol do you use to ensure there is no deadlocking?
tags: google software
Q243: How do you reverse a single linked list?
tags: ebay software
Next page
Q178: What is the purpose of the preprocessor directive #error?
tags: WindRiver software programming embedded
Q179: What does the following code output? <pre> void foo(void) { unsigned int a=6; int b=-20; (a+b >6) ? puts(">6") : puts("<=6"); } </pre>
tags: microsoft WindRiver software programming embedded
Q180: Write a progam to print a binary tree such that the root is printed in the middle of its left and right sub-trees.
tags: microsoft software programming C
Q181: What is the difference in memory management between Java and C++? Is it possible to create a memory leak in Java?
tags: ebay microsoft amazon software programming C java c++
Q191: Implement a queue in an array.
tags: Microsoft software c c++ programming
Q200: Design and describe a system/application that will most efficiently produce a report of the top 1 million Google search requests.These are the particulars. * You are given 12 servers to work with. They are all dual-processor machines with 4Gb of RAM, 4x400GB hard drives and networked together.(Basically, nothing more than high-end PC's) * The log data has already been cleaned for you. It consists of 100 Billion log lines, broken down into 12 320 GB files of 40-byte search terms per line. * You can use only custom written applications or available free open-source software.
tags: google sw software programming design algorithms
Q204: Given a string, with spaces, replace spaces with %20. You have extra space on the end of the string. (No additional memory and do it as close to O(n) as possible).
tags: microsoft software programming algorithm string
Q205: Write the 'grow' function for a C++ vector class
tags: microsoft software programming algorithm C++
Q208: Write a function to find the 2 biggest numbers in an array, and return the sum. How about the K biggest elements in the array, and return the sum. Do both in linear time.
tags: microsoft software programming algorithm
Q209: Write a function to find the next prime number after a given number.
tags: google microsoft software programming algorithm
Q210: From K sorted arrays, each of size N, how would you construct one big array, and what would the big-O of the procedure be? What if you only had memory of size 2N.
tags: google microsoft software programming algorithm
Q211: Find the nth node in an in-order search of a tree.
tags: google microsoft software programming algorithm
Q212: Find the intersection of 2 sorted integer arrays. What if one of them is huge? What if one of them is so huge, it can't fit in memory. How do you minimize the number of disk seeks?
tags: google microsoft software programming algorithm
Q213: How do you represnt a directed graph in a relational table?
tags: google microsoft software programming algorithm database sql
Q214: Given 2 strings (as character arrays) A and B, how would you determine if the characters in B were a subset of the characters in A.
tags: google microsoft software programming algorithm
Q215: Given that there are about 4 billion pages indexed by Google, how would you keep from indexing the same page twice?
tags: google microsoft software programming algorithm
Q216: How would you find out if a machine's stack grows up or down in memory?
tags: google software programming architecture
Q217: Implementation unbounded precision multiplication in C++.
tags: google software programming algorithm C++
Q218: Write Java vector add() by using C++ Templates
tags: google software programming algorithm C++ java
Q219: Given a set of KEY->VALUE pairs such that each KEY is unique, describe a method of storing these pairs on disk, and a method for accessing the corresponding VALUE given a KEY. Assume that RAM is fixed at 1gb and the set of pairs requires 40gb. HINT: we are trying to minimize page-transfers
tags: google software programming algorithm database
Q220: Given N computers networked together, with each computer storing N integers, describe a procedure for finding the median of all of the numbers. Assume that a computer can only hold O(N) integers (i.e. no computer can store all N^2 integers). Also assume that there exists a computer on the network without integers, that we can use to interface with the computers storing the integers.
tags: google software programming algorithm
Q221: Given the sequence S1 = {a,b,c,d,...,x,y,z,aa,ab,ac.... } and given that this sequence corresponds (term for term) to the sequence S2 = {1,2,3,4,....} Write code to convert an element of S1 to the corresponding element of S2. Write code to convert an element of S2 to the corresponding element of S1.
tags: google software programming algorithm
Q222: Given a binary tree with the following constraints: a) A node has either both a left and right child OR no children b) The right child of a node is either a leaf or NULL write code to invert this tree.
tags: google software programming algorithm
Q223: Given a square with side length = 1, describe all points inside square that are closer to the center of the square than to the edge of the square.
tags: google software programming algorithm
Q225: Given an array A[string], an array of strings where each string represents a word in a text document. Also given 3 search terms T1, T2, and T3 and 3 corresponding sorted sequences of integers S1, S2, and S3 where each integer in Si represents an index in A where search term Ti occured (i.e. S1, S2, and S3 contain the locations of the search terms in our array of words). Now find a minimal subarray of A that contains all of the search terms T1, T2, and T3. Extend this algorithm for an arbitrary number of search terms.
tags: google software programming algorithm
Q226: Design a data structure that supports push(), pop(), and min() all in O(1) timeDesign a data structure that supports push(), pop(), and min() all in O(1) time
tags: google software programming algorithm
Q228: What are the variable types in perl, how can you visually identify them in code?
tags: google software programming perl
Q239: Rank the functions in order of their asymptotic behaviour ( which is the greatest) 1. 2^n 2. n! 3. n^googol ( googol=10^100) 4. n^n
tags: google software math
Q240: you have n resources and n threads .. what protocol do you use to ensure there is no deadlocking?
tags: google software
Q243: How do you reverse a single linked list?
tags: ebay software
Next page
