Home Company Questions Yahoo Interview Questions Yahoo Interview Questions - 1

Login Form




Yahoo Interview Questions - 1 Print E-mail

1. There is a n x n grid of 1's and 0's. Find the i , where i is the row containing all 1's and all 0's(except the intersection point). Should do it in less than 25 comparisons.

 

2. What is web service?

Answer : Web Service is defined as "a software system designed to support interoperable Machine to Machine interaction over a network." Web  services are frequently just Web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.

 

3. Implement a c++ class such that it allows us to add data members at runtime.

 

4. What is the difference between COM and CORBA?

Answer : COM is linked to Microsoft and CORBA to UNIX,Moreover, COM objects require installation on the machine from where it is being used .CORBA is ORB (Object request broker) , and also its a specification owned by OMG, which is open. Not owned by a company. So we cannot say that it only belongs to Unix. Corba servers can run on windows NT, and CORBA clients can run on Unix.

 

5. Use 2 stacks to implement a queue. Followed up with making the access to the Data structure concurrently.

 

6. How to count number of unique music titles downloaded from a log file which contains an entry of all music title downloaded?

 

7. Design classes for the following problem. (C++)

A Customer Can have multiple bank accounts A Bank account can be owned by multiple customers When customer logs in he sees list of account, on clicking on an account he sees list of transactions.

Answer :

Customer class, Account class, Transaction class
Customer class contains an array of pointers to the account classes
Account class contains an array of pointers to its owner customer classes
Account class also contains an array of transactions associated to it.
Transaction class contains id or pointer the customer who did that transaction
In customer class write a function with prototype


for (i in Accounts )

{

  cout << i.AccountName << endl;

} cin >> id;

for(i in Accounts[id].transactions )

{

  cout << i.TransDetails << endl;

}

 

8. When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)

 

9. Implement a transaction manager in a database server

 

10. Can you write a foo() in c? If so how can u do it ?