Interview questions
Algorithm interview questions – page 8
811 questions. Tap “Show answer” to check yourself.
-
Implement a transaction manager in a database server. The discussion involved a lot of stuff about transaction logs.
-
Write a program in c to store details of 100 books of a library where each record contains booknumber, book name, bookauthor, publisher, number of copies,unit cost. Read the data from an external file. Implement insertion o...
-
Implement the function bool isRegex(char *reg, char *string); This function is passed two strings : a regular expression, consisting of the [a-z] and the * and ? characters. We had to check if the string matched the supplied regular expression. Fo...
-
Implement the unix command WordCount (wc) using lenguage of your choice. The method takes a string and returns the number of words in the string, number of chars and the number of lines.
-
You are given 2 log files each having 1 billion entries and each entry has a unique customer id.You need to print the records in two files which are common.
-
Design a 7 sided dice from a 5 sided dice i..e given a dice which will give results in the range of 1-5 how do you get results in the range of 1-7 from the same dice.
-
Given an array A[], write a function to separate even and odd numbers (i.e., put all even numbers first than odd numbers)
-
Sort a given data according to its weight and relevance.(relevance was provided)
-
Given an array & target value. Find a,b,c such that a+b+c=target focus time & space
-
You are getting a number of two-tuple values <time, val>, where time is non-decreasing. Then a query asks for the value at a particular time. If a tuple exists for that time, it returns the val. Otherwise it returns val from the tuple that i...
-
Given natural numbers 1 to infinity
-
Given a string, u need to print all cases of letters without changing the order
-
Write a program to arrange numbers from 1 to 16 such that the sum of two consecutive numbers is a perfect square.
-
There are 8 characters and the probability of their occurrence is 1/2, 1/4, 1/81/256. How will u represent it in binary using minimum no. of bits ?
-
You have a screen that consists of pixel. x,y identifies a pixel in the screen. How to convert x,y value to store the pixel information in one dimensional array. Store pixel(x,y) = array[n].
-
Why binary search in not effective for linked list explain in detail
-
Write a program to create a backup utility. Programming language allowed: C, Shell Scripting.
-
Given two sorted positive integer rrays A(n) and B(n). We define a set S = {(a,b) such that a in A and b in B}. Obviously there are n^2 elements in S. The value of such a pair is defined as Val(a,b) = a + b. Now we want to get the n pairs from S w...
-
Write down a program to print fibonacci series in C.
-
You have an array with n elements. The elements are either 0 or 1. You want to split the array into kcontiguous subarrays. The size of each subarray can vary between ceil(n/2k) and floor(3n/2k). You can assume that k << n. After you split th...
-
What is the most efficient way to Compare two text documents? Also we need to find the percentage by which They match..
-
Why should we use data warehousing and how can you extract data for analysis with example?
-
Given an array, find two numbers a and b such that |a + b| is smallest.
-
Lucky numbers are numbers whose prime factors are just 2, 3, 5. Find the first k lucky numbers.
-
Wat is the no of spanning trees in a n-tree if all the edges have equal weights
-
Write a function to check if two rectangles defined as below overlap or not.
-
You have a array of int. Elements of the array are in sequential order. For example, {0,1,2,3}, {0,1,2,3,4,5}. Now, you have given an array and only one sequence is missing. How will you determine which sequence number is missing. {0,1,2,4,5,6}, H...
-
3. Given a number of nodes N of a binary tree , how many structurally different full binary trees are possible. A binary tree is said to be full binary tree , if for every node in the tree there exists exactly zero or 2 children.
-
Given a string, print all the English words in the given string. For example if the given string is "abc cat is defg kjklj" then your program should print "cat" & "is"
-
Given a 2D array, find the kth largest sum of two elements picked from this array.