Interview questions
System Administrator interview questions – page 4
2,099 questions. Tap “Show answer” to check yourself.
-
Write a data structure to count number of connections on web server in last 1 minute.
-
Given an array of n elements and an integer k where k<n. Elements {a[0]...a[k] and a[k+1]...a[n] are already sorted. Give an algorithm to sort in O(n) time and O(1) space.
-
How would you find maximum of 2 numbers without using relational operator. Now find maximum of 3 numbers, then 4 numbers.
-
Given The Linked List remove the all duplicates elements from it while order should be maintained i mean 3-1-2-1-2 so o/p should be 3-2-1 e.g order of linked list shouldn't be broken & we have to return the original linked list without d...
-
You are given the amazon.com database which consists of names of millions of products. When a user enters a search query for particular object with the keyword say "foo", output all the products which have names having 50% or more similarity with ...
-
Input -> India is a great country. Key(alphanumeric) - B2. You have to encrypt the given sentence, in such a way that only the words should be jumbled.
-
Given an nxn screen, Each pixel is represented by intensity values. Given a specific pixel as an input, find the no. of pixels of the same colour which can reached from this pixel. Assume any suitable data structure for a screen.
-
Ou have a Word Processor type Program. There are 2^16 fonts. Each font is associated with a 4MB geometric instruction set. This is written in a flat file. Everytime a user selects a font this file is searched linearly. Develop a program to o...
-
Offered a string S of alphabets and two characters a,b discover the minimum distance amongst circumstances of them these that position of a > position of b.
-
Given two rectangles, how would you find out whether one rectangle lies inside another?
-
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to buy one share of the stock and sell one share of the stock, design an algorithm to find the best times to buy and sell
-
What's the max insertion time for a hash table?
-
How to convert positive number to negative and negative to positive
-
Given nxn boolean matrix (0's and 1's) .
-
Write an algorithm two divide two extremely large numbers, which cannot be stored in an int, long int, float, double etc. Find the remainder and quotient .
-
A graph is given. You need to design a data structure with minimum space complexity such that it does the follows --> Finds whether there is a path of length k between u and v in O(k) time --> Finds whether there is a path of l...
-
Given a book find out the number of times each word appeared. Upon clarification I was told the following things 1. punctuations should be removed 2. case sensitive 3. assume book is given as a huge string to the function prototype 4. Words need n...
-
Write a pgm that implements polymorphism.
-
If you click on any orkut member's name you will notice the relationship graph for both of you indicating through whom you are interconnected or in certain cases you won't get this path.
-
Given a cube of size n*n*n (i.e made up of n^3 smaller cubes), find the number of smaller cubes on the surface. Extend this to k-dimension.
-
Given k sorted streams where each stream could possibly be infinite in length, describe an efficient algorithm to merge the k streams into a new stream (also in sorted order).
-
What kind of data structure would you use to index annagrams of words? e.g. if there exists the word "top" in the database, the query for "pot" should list that.
-
An ASCII character is one byte long and the most significant bit in the byte is always '0'. b) A Kanji character is two bytes long. The only characteristic of a Kanji character is that in its first byte the most significant bit is '1'.
-
Rotate an array using reverse function.
-
In a 2D matrix, a[i][j]= 1 if there is flight from city i to city j else a[i][j]=0 Code to find out all the pairs of towns connected by 1 hop flights.
-
2-d array sorted both row wise and column wise. Find the search element - (logn complexity)
-
There is an integer array. The array represent a graph which increases till one point and then start decreasing. WAP to find the maximum number in that array. Write production quality code which handles all the scenarios. He also checked various c...
-
An array contains both positive and negative numbers in a random order. for example [-1,2,-3,4,5,6,-7,8,9]
-
Binary Search program has been given and asked us to write some test cases. I have not full gone through the code, so they must have given some defect in the code
-
Write your own strtok(sting,token) function..O(n^2).