## Computer Scientist Interview Questions

- 0of 0 votes
You have been given a string and a number. You need to find the longest common suffix between string and substring(0 to number)

Example : String = "ababa"

Number is 3

Take a substring from 0 to 2 which is aba

now find the longest matching suffix between "ababa" and "aba"

- 0of 0 votes
How To Recover Gmail Account

If you facing any issue like hack Gmail account, forget Gmail password, reset Gmail password and more then you should contact to Gmail customer service number 800 674 2896 which is very reliable and known for its instant help by our expert technician. http://www.helpdeskphone.com/gmailpasswordrecovery/

- 0of 0 votes
There are some professors, some courses, and some students.

Each professor can teach only a single course.

Each course has a fixed duration(Eg. 10 weeks).

For each professor, you are given time availability schedule(assume week wise).

Each student has a list of courses he wants to learn.

There can be only 1:1 classes, i.e., 1 professor can teach only a single student.

A student can attend only one course at a time.

A professor has to finish teaching a course in a one go.

Your aim is to prepare a schedule so that all courses are taught in the least time.

- 0of 0 votes
Given a stream of numbers which contains n numbers, each number is positioned at max k positions away from its actual position. Sort the array in the most optimized way.

- -2of 2 votes
Get Online Yahoo Technical support number 1800 – 360 – 519: Yahoo is one of the prime assets to open any website very smoothly. Due to some technical difficulty, some person has to face cracking issue and fixing this issue is not under the control of other person. So, it is advised that you should have to end your query at our third party technical support team destination because we have perfect knowledge to chase the problem in the correct manner. Our professional will help to you as you dial Yahoo Technical support number speak out all problems at our toll free number. To know more information: http://www.customercarenumber.co.nz/yahoo-customer-care-number

- 0of 0 votes
You have a cycled doubly linked list (meaning there is a cycle and each node has prev() and next() method).

You can set/check the value of each node in the list to be 0/1 (method setValue(0/1) getValue())

Find how many elements there are in the list.

You start from the some node and you don’t know the status of the nodes value, could be any combination of 1’s and 0’s)..

- -3of 3 votes
Getting problem in yahoo mail what to do

If you are finding trouble in accessing your Yahoo mail, it may be that there would be some severe issues running with your Yahoo account. So, here you can connect with an independent service provider of Yahoo. This party service provider services are available throughout day and night. So, their experts are going to make you have prompt solution for Yahoo email issues. Yahoo technical support number helps you to connect directly with an advanced technical expert who can deal with any of the issues with your Yahoo. They are not only going to resolve password issues but also going to strengthen the security of your Yahoo mail.

http://www.email-support-desk.com/yahoo-customer-care.html

- 0of 0 votes
Find out the number of ways in which two queens can be placed in a 8*8 chessboard.

- 0of 0 votes
Find the possible (x,y) coordinates in a given 2-D chess board which are safe from the attack of a queen.

- -1of 1 vote
Consider a string, s = "abc". An alphabetically-ordered sequence of substrings of s would be {"a", "ab", "abc", "b", "bc", "c"}. If we reduce this sequence to only those substrings that start with a vowel and end with a consonant, we're left with {"ab", "abc"}. The alphabetically first element in this reduced list is "ab", and the alphabetically last element is "abc". As a reminder:

Vowels: a, e, i, o, and u.

Consonants: b, c, d, f, g, h, j, k, l, m, n, p, q, r, s, t, v, w, x, y, and z.

Complete the findSubstrings function in your editor. It has 1 parameter: a string, s, consisting of lowercase English letters (a − z). The function must find the substrings of s that start with a vowel and end with a consonant, then print the alphabetically first and alphabetically last of these substrings.

Input Format

The locked stub code in your editor reads a single string, s, from stdin and passes it to your function.

Constraints

3 ≤ length of s ≤ 5 × 105

Output Format

Your function must print two lines of output denoting the alphabetically first and last substrings of s that start with a vowel and end with a consonant. Print the alphabetically first qualifying substring on the first line, and the alphabetically last qualifying substring on the second line.

Sample Input 1

aba

Sample Output 1

ab

ab

Explanation 1

"ab" is the only possible substring which starts with a vowel (a) and ends with a consonant (b). Because we only have 1 qualifying substring, "ab" is both the alphabetically first and last qualifying substring and we print it as our first and second lines of output.

Sample Input 2

aab

Sample Output 2

aab

ab

Explanation 2

There are 2 possible substrings which start with a vowel and end with a consonant: "aab" and "ab". When ordered alphabetically, "aab" comes before "ab". This means that we print "aab" (the alphabetically first qualifying substring) as our first line of output, and we print "ab" (the alphabetically last qualifying substring) as our second line of output.

Sample Input 3

rejhiuecumovsutyrulqaeuouiecodjlmjeaummaoqkexylwaaopnfvlbiiiidyckzfhe

Sample Output 3

aaop

utyrulqaeuouiecodjlmjeaummaoqkexylwaaopnfvlbiiiidyckzfh

Explanation 3

There are 4830 substrings of s, but only 676 of them start with a vowel and end with a consonant. When ordered alphabetically, the first substring is "aaop" and the last substring is "utyrulqaeuouiecodjlmjeaummaoqkexylwaaopnfvlbiiiidyckzfh".

- 1of 1 vote
Given a binary tree, whose leaf nodes are connected,

1

/ \

2 3

/ \ /

4 5 6

Now 4,5,6 are leaf nodes in the above BT, 4->5->6

4's left is pointing to 6 and 6's right is pointing to 4. We have a circular DLL of leaf nodes.

We need to find the height of this tree?

- 0of 0 votes
U have given a undirected weighted graph. U have to create Spanning tree (not MST). The Property is the difference between the min and max edge weight of Spanning edges should be min.

- -1of 1 vote
Input: set of coordinates = [P1,P2,...,Pi,.....Pj,....Pn]

P denote Point(x,y)

Start point is any of set of coordinates like Pi

simily end point is also any of set of coordinates like Pj.

Find the shortest path with set of points between start and end points.

Let us have a simple example

Set of coordinates :

P4 P5 P6

P1 P2 P3 P7 P8 P9 P11 P12 P13

P10

Start Point: P2

End Points: p12

Output: P2,P3, P7,P8,P9,P11,P12

- 0of 0 votes
Given a number (200), compare it to four variables (E.G A,B,C,D) and return true if they are all equal to the given number.

Do this in the most efficient way, and if possible without if statements.

- 2of 2 votes
Given an array of positive integers(>0) , you have to insert '+','*','(',')' signs basically plus multiply and brackets such that value of resultant expression becomes maximum.

Hint: Consider case of continuous ones

You have to print the resulting expression

- 0of 0 votes
Given N natural numbers A1, A2, A3 . . . AN, you have process Q queries of following two types:

1 i j: Perform the operation Ai = j.

2 L R: Print the LCM of the elements AL, AL+1, AL+2 . . . AR.

Here LCM stands for lowest common multiple. Please help Shil to open the lock.

Input

First line will contain integer N.

Second line will contain N natural numbers denoting array A.

Third line will contain number of queries Q.

Then next Q lines will contain either query of Type 1 or 2.

Output

For each query of Type 2 output the required answer. Since LCM can be very large output it modulus 109+7.

- 2of 2 votes
Given an array A with n integers.

Rearrange array such that

A[0]<=A[1]>=A[2]<=A[3]>=A[4]<=A[5] and so on

Edit: Array is not sorted

You have to do it in linear time O(N)

- 1of 1 vote
There is a tournament among n teams. and we have a function which takes two team and tells which team is the winner (suppose function takes constant time),then print the result sequence array. There may be number of result sequences so print anyone.Result sequence array will contain the teams in the following manner :

Team1 has won against team 3 , team 3 has won against team 4,team 4 has won against team 2.

and ofcourse output sequence must contain all the teams and no team should get repeated.

E.g. there are 3 teams.

T1, T2, T3

match (T1,T2) = T1

match(T2,T3) = T3

match (T1,T3)= T1

Output Sequence = T1 -> T3- > T2

- 0of 0 votes
The task have two goals:

1. A method to estimate the noise level of bio-medical signals.

2. Quality quantification of detection algorithms.

In particular you will be focused on heart rate measurement signals and detection algorithms.

Both of these involves a research about the biological aspects of the signal sources, noise sources, digital processing and mathematical/physical model of these.

- 0of 0 votes
Implement recursion function " wildmatch" that matches the string to the pattern, where the symbol ? may represent any symbol and symbol* may represent any string f.e

wildmatch (agcbc, a*ba)=1

P.S. I not understood this question , do you have any ideas how to solve it?

- 0of 0 votes
how to design a relation functionality. similar to facebook , how to hold friends objects for a user profile , so that that is easily searchable . how to use cache for this?

- 0of 0 votes
How to classify 3 classes using each MICD and MED classifiers using Matlab ?

- 0of 0 votes
you have numbers between 1 to n. a set of number i.e. (4,5) means that person number 4 is connected to person number 5. find all the ways the a group of n pepole can be connected. i.e. for 0 and 1 there is the empty set, for 2 there is 2 ways, empty set and {1,2} only for 3 there are 4 ways: {}, {(1,2)} {(2,3)}, {(3,1)} for 4 there are 10 ways ({},{(1,2)}, {(1,2),(3,4)},.......

you can do it by factorial and cobination but there is another way that state that:

T(n)=T(n-1) + (n-1)*T(n-2)

(while T(n) is the function that computes the number of ways..

Can someone explain why this equation is true?

- 0of 0 votes
you have a numbers between 1 to n. a set of number i.e. (4,5) means that person number 4 is connected to person number 5. find all the ways the a group of n pepole can be connected. i.e. for 0 and 1 there is the empty set, for 2 there is 2 ways, empty set and {1,2} only for 3 there are 4 ways: {}, {(1,2)} {(2,3)}, {(3,1)}

for 4 there are 10 ways ({},{(1,2)}, {(1,2),(3,4)},.......

you can do it by factorial and cobination but there is another way that state that:

T(n)=T(n-1) + (n-1)*T(n-2)

(while T(n) is the function that computes the number of ways..

can someone explain why this equation is true?

Thanks...

- 0of 0 votes
How does map-reduce work? Explain with diagram.

- 0of 0 votes
Difference Between Call by Value and Call by Ref.

- 0of 0 votes
what is virtual function?

Give an example scenario of use.

- 1of 1 vote
Design & Implement your own Json parser. It should handle all cases. And it should also JUnit testable.

- 0of 0 votes
1st Face to face

--------------------

Find if any string has repetitions or not.

Ababababab - true

Abcabcabcx - false

Abcdabce - false

Abaaabaaabaa - true

Virtual functions?

2nd facte to face

----------------------

Create a strategy for testing flipkart.com (any e-com site)

Suppose it is under development.

- I started with UI testing but he said that UI is developed in end

- What all positive scenarios to be tested? Negative scenarios to be tested?

- How you will ensure integration

What all type of testing should be done?

Explain observer design pattern.

Write a code in which the client registers some method on Registrar and the registrar calls that method in case some event happens.

- I created a hash table for events and function pointers but he was more worried about my testing knowledge.

- 1of 1 vote
string x = "1..5,8,11..14,18,20,26..29"

string y = "1,2,3,4,5,8,11,12,13,14,18,20,26,27,28,29"

Write a C++ program to expand a given string x to y.