Interview questions
System Administrator interview questions – page 3
2,099 questions. Tap “Show answer” to check yourself.
-
Given a string containing 0's and 1's. One would need to find the longest sub-string such that the count of 0's is equal to the count of 1's in the largest sub string.
-
We have been given a deck of cards and each combination has a rating eg 3 As is higher than 2 As 1K etc. Write an algorithm such that the probability of picking 3 or 5 or 7 cards from the deck results in high rating
-
Given an integer 'k' and an sorted array A (can consist of both +ve/-ve nos), output 2 integers from A such that a-b=k. PS: nlogn solution would be to check for the occurence of k-a[i] (using binary search) when you encounter a[i]. methods l...
-
Consider two non-empty zero-indexed arrays A and B consisting of N integers each. Four functions are defined based on these arrays:
-
You are given 2 arrays sorted in decreasing order of size m and n respectively.
-
To start a Thread, you call the following method
-
Print the nodes of binary tree in on sorted order
-
You have a big screen array containing pixel values at each points. You want to implement cut and paste functionality, of a rectangular sub-block from one place to other inside this big block. How do you go about implementing such a function? </...
-
You are given n Matrices and you have to multiply them, So what you have to do is to minimize the number of product while multiplying them all.
-
Consider the set of integers 1,2,3,4,5,6,7,8,9,10,11,12,14,15, ...
-
Order the functions in order of their asymptotic performance
-
Assume you have an array that contains a number of strings (perhaps char * a[ 100]). Each string is a word from the dictionary. Your task, described in high-level terms, is to devise a way to determine and display all of the anagrams with in the a...
-
Given an array A[] and a integer num. Find four no.s in the array whose sum is equal to given num. Brute force :- O(n^4) I solved it in O(n^3) But the interviewer was insisting on a better solution.
-
Given n non overlapping intervals and an element. Find the interval into which this element falls.
-
Permutation Function which could print in Sorted Order.
-
An array of size n+1 has integers only from 1 to n. The integers 1 to n can be present 0 or more times in the array. Find the first repeating element in the array. Restrictions: O(n) algo required. Cannot use extra space(not even O(1)).
-
Consider product ratings of amazon. ( these are avg ratings out of 5, say 3 persons gave it rating of 3 4 and 5 ,the avg rating would be 4 ). For given large amount of products you have to find top ten products based on these avg ratings. No...
-
Steps involved in insertion and deletion of a node from skip lists?
-
Generate prime Number in range of [a,b] , more concentrate on Time Complexity of Algorithm How its O(nlognlog(logn)) Can Anyone explain in detail ?
-
Code to see if a binary tree is a BST or not.
-
Design a temperature control system in your house.
-
Find a 8-digit number, where the first figure defines the count of zeros in this number, the second figure the count of numeral 1 in this number and so on...
-
Given an Infinitely long rail track and two robots.
-
What is the time and space complexities of merge sort and when is it preferred over quick sort?
-
Write efficient program to find the number of divisors of number what is the time complexity of finding the number of devisors of a number..?
-
Given two Points P1(x1, y1), P2(x2, y2) given a function to draw a point draw(double x, double y) and also x2>x1 write an algorithm to draw line.
-
Suppose you have a M-by-N matrix (i.e. M rows and N columns), whose entries are all integers. Set all the elements of the j-th row and k-th column to 0 if matrix[k][j] is 1.
-
You are given n strings. You have to find whether a chain can be formed with all the strings given namely n ? A chain can be formed between 2 strings if last character of the 1st string matches with the first character of the second string. ...
-
Given a matrix you have to find the shortest path from one point to another within the matrix. The cost of path is all the matrix entries on the way. You can move in any direction (up, down, left, right, diagonally)
-
Given n elements & their is dependency between them it can linear or circular or any other dependency you can think of , you to explain the algorithm that tell the write order of execution of all program , he discussed about the data structure...