Interview questions
System Administrator interview questions – page 5
2,099 questions. Tap “Show answer” to check yourself.
-
What is the best sorting method for almost sorted array? a.quicksort c.hapsort c.shell sort d.bubble
-
Implement a stack that pops out the most frequently added item. Stack supports 3 functions - push, pop,and top. Give complexity of each functions in your implementation.
-
We all knw hw to find a loop in a singly linked list (Using hare and tortoise method)..what if the linked list is a doubly linked list?can we do it smthn better than hare n tortoise method using the advantage of the doubly linked list?
-
You are given a small sorted list of numbers, and a very very very long sorted list of numbers - so long that it had to be put on a disk in different blocks. How would you find those ( short list) numbers in the bigger list?
-
Given an array of Integers,if u are on ith element u can make max arr[i] jumps. If i am at an element with value zero, i cannot move forward. Find the least selection to reach end of the array. ex: 1 3 5 8 9 2 6 7 6 8 9 starting with a...
-
Given an array (length n), we need to find the subarray (length k) such that the sum of the first j elements of the subarray equals the sum of the remaining (k-j) elements of the subarray. For e.g. Array: 2,2,13,4,7,3,8,12,9,1,5 ...
-
Given an array of n numbers where numbers could also be negative. Give an algorithm that should find index i and index j such that sum of numbers from index i to index j in that array is maximum over all possible values of i and j. Give an algorit...
-
Given a linked list with a set of elements , group the elements into even and odd numbers. Example. Input: 1->4->6->7->10->13 Output: 1->7->13-> or 4->6->10->1->7->13 The output can be any o...
-
You have one big unsorted file in hard disk, which is bigger than your RAM size. Now WAP to sort this file
-
In a array of size n, there is one number missing and one number repeated twice. Find them.
-
Columns are represented using alphabets (Like MS Excel). Example: first column - 'A' second column: 'B' . . . 26th column : 'Z' 27th: 'AA' . .
-
Given a stream of numbers, suggest a data structure to store all distinct numbers and their counts.
-
Find longest interval We are given with two arrays A and B..each of size N...elements of array contains either 1 or 0... we have to find such an interval (p,q)(inclusive) such that the sum of all the elements of A (between this interva...
-
You are given with three sorted arrays (in ascending order), you are required to find a triplet ( one element from each array) such that distance is minimum.
-
You are given a two dimensional character array of size n x n. It is filled with some characters. Now I will give you a name say "Ram"..and you have to find whether there exist any curve in the grid which when joined gives "Ram"
-
There is a river and there are n number of steps between two banks of the river to cross the river.
-
Given an array of 'n' numbers - find all the triplets that satisfy the condition "a + b = c"
-
3)Given a file contiaining number of words , with one word per line .Print a string together that are anagrams
-
A code of bubble sort was given .. all the numbers r in ascending order initially ..the code was such that numbers would be in descending order. how many swapping possible?
-
A mail server exposes an interface as mentioned below. When given a day in the calendar a user, it gets the meetings mentioned as slots in calendar with start and end time for each meeting.
-
A) Design a data structure to store an arbitrarily large number b) How will you use it to store two such number and add them. c) Write down the class (code) for the data structure.
-
Write down the c code for finding out the maximum scope depth in a c code. A scope depth is increased by one with every '{' and decreases by one with every '}'
-
Given a million 3D points, how will you find the 10 closest to the origin?
-
In a given array int num[10] ={1,-5,6,7,9,9,20,25,31,45} it is a sorted array. write a function void findsum(int [],int x) int [] is array and x is number. function should print all possible pair of elements in array that can make a sum equal to x...
-
You have two very large binary trees: T1, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a subtree of T1.
-
In a ternary tree which has three childs for every node, if the number of internal nodes are N then the total number of leaf nodes are
-
Given a input text file, write a program to print the output as follows:
-
Find all the anagrams of a given word in the least amount of time. You are provided a dictionary which u can preprocess in any way.
-
Write a program to convert binary tree in to doubly linked list such that doubly linked list represents the spiral order of given tree using recursion, Inplace(no Extra Space except recursion memory stack)
-
Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Eg. input 1->2->3->4->5->6->7->8->NULL output for k=3 should be 3->2->1->6->5->4->8->7->NULL. </p...