NASKAR

Monday, June 05, 2006

Java Notes:

1. The singly rooted hierarchy in Java
The advantage s are:
1. All objects in a singly rooted hierarchy have interfcase in common.
2. The singly rooted hierarchy makes it easier to implement garbage collector.
3. A singly rooted hierarchy, along with creating all objects on the heap, greatly simplifies argument passing..... don't kow how though


2. Where storage of object lives
It’s useful to visualize some aspects of how things are laid out while the program is running—in particular how memory is arranged. There are six different places to store data:

a. Registers. This is the fastest storage because it exists in a place different from that of other storage: inside the processor. However, the number of registers is severely limited, so registers are allocated by the compiler according to its needs. You don’t have direct control, nor do you see any evidence in your programs that registers even exist.

b. The stack. This lives in the general random-access memory (RAM) area, but has direct support from the processor via its stack pointer. The stack pointer is moved down to create new memory and moved up to release that memory. This is an extremely fast and efficient way to allocate storage, second only to registers. The Java compiler must know, while it is creating the program, the exact size and lifetime of all the data that is stored on the stack, because it must generate the code to move the stack pointer up and down. This constraint places limits on the flexibility of your programs, so while some Java storage exists on the stack—in particular, object references—Java objects themselves are not placed on the stack.

c. The heap. This is a general-purpose pool of memory (also in the RAM area) where all Java objects live. The nice thing about the heap is that, unlike the stack, the compiler doesn’t need to know how much storage it needs to allocate from the heap or how long that storage must stay on the heap. Thus, there’s a great deal of flexibility in using storage on the heap. Whenever you need to create an object, you simply write the code to create it by using new, and the storage is allocated on the heap when that code is executed. Of course there’s a price you pay for this flexibility. It takes more time to allocate heap storage than it does to allocate stack storage (if you even could create objects on the stack in Java, as you can in C++).

d. Static storage. “Static” is used here in the sense of “in a fixed location” (although it’s also in RAM). Static storage contains data that is available for the entire time a program is running. You can use the static keyword to specify that a particular element of an object is static, but Java objects themselves are never placed in static storage.

e. Constant storage. Constant values are often placed directly in the program code, which is safe since they can never change. Sometimes constants are cordoned off by themselves so that they can be optionally placed in read-only memory (ROM), in embedded systems.

f. Non-RAM storage. If data lives completely outside a program, it can exist while the program is not running, outside the control of the program. The two primary examples of this are streamed objects, in which objects are turned into streams of bytes, generally to be sent to another machine, and persistent objects, in which the objects are placed on disk so they will hold their state even when the program is terminated. The trick with these types of storage is turning the objects into something that can exist on the other medium, and yet can be resurrected into a regular RAM-based object when necessary. Java provides support for lightweight persistence, and future versions of Java might provide more complete solutions for persistence.

3. "==" operator in Java compares Object reference and if we really wants to compare the actual content of the object we should use "equals()".

4. A class containing abstract methods is called an abstract class. If a class contains one or more abstract methods, the class itself must be qualified as abstract.

5. Inheritance vs Composition

6. Difference between abstract and interface.
a. Declare an interface using the keyword interface.
b. An interface may extend zero or more interfaces if it likes, but it cannot extend a class, because then it would inherit functionality, and interfaces cannot have functionality. They can only talk about it.
c. Interface methods cannot be static.
d. Interface methods are implicitly abstract. For that reason, you cannot mark them final (duh), synchronized, or native because all of these modifiers tell how you're going to implement the method, and you're voluntarily giving up that ability when you write the method in an interface.
All interface methods are implicitly abstract and public, regardless of what you write in the interface definition! It is true. The interface method declaration void biteIt(int times), despite its apparent access level of default, actually has public access. Try it. If you write a class in another package beyond the visibility of default access, and include the seemingly legal implementation of
void biteIt(int times) { ; },
the compiler will tell you that you cannot reduce the visibility of the method from public to default. They're all abstract; they're all public.
An interface can define variables. But all variables defined in an interface must be declared public, static, and final. Many Java programmers have adopted the practice of defining only variables within an interface and putting constants in it. This works to get at shared constants, but it is a workaround and is no longer necessary if you're using J2SE SDK 5.0. It features a new static import facility that allows you to import constants just as you would a class or package.
It should be obvious by now that an interface cannot implement another interface or a class.
You may modify your methods using the keyword abstract if you like, but it will have no effect on compilation. Methods in an interface are already abstract, and the Java Language Specification says that its use in interfaces is obsolete.

Likewise, the interface itself is already abstract. So you can do this if you want: public abstract interface Chompable {}. But there's no point; it's redundant.
Interfaces have default access by default (!). So this is legal: interface Chompable { }. But if you want your interface to have public access, use that modifier in the interface declaration.
You cannot declare an interface as having private access. It doesn't make any sense. No one could implement it. So private interface Chompable { } gets you a compiler error for your trouble.
public, static, and final are implicit on all field declarations in an interface.
There are some weird things to keep in mind.
Interfaces can be declared private or protected if they are declared nested inside another class or interface. The following will compile, though its usefulness is dubious at best.
public class interface test
{
private interface myinterface{ }
}

Only an inner class of the class of which the interface is declared can implement the interface.

7: . Can an anonymous class be declared as implementing an interface and extending a class?
Answer: An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
8. What's the purpose of the Runtime class?
9. What's the purpose of the system class?
10. Difference between Hashtable and Hashmap?

11. Which class should you use to obtain design information about an object?
The Class class is used to obtain information about an object's design.

12. Difference between equals() and == operator in Java
The equals() method compares the characters that make up String objects. It performs this comparison by putting the characters of the String objects into two char arrays and comparing the two arrays. The method returns true if all the elements of the char arrays match and false otherwise.
The == operator compares two object references to see whether they refer to the same instance. A pool of strings, initially empty, is maintained privately by the class String. All literal strings and string-valued constant expressions are interned there. You can also add your own strings to this pool by calling the intern() method. If the pool already contains a string equal to your String object, as determined by the equals(Object) method, then the string from the pool is returned. Otherwise, your String object is added to the pool and a reference to it is returned. It follows that, for any two strings s and t, s.intern()==t.intern() is true if and only if s.equals(t) is true.
To sum up: The equals() method determines whether two strings have the same characters, whereas the == operator determines if two operands refer to the same String object. == actually tests to see if the references in the variables point to the same memory address.

13. Why is String immutable and final?
the contents of the String class cannot be changed. any method that you might expect to modify the contents actually returns a new instance.
if you don't like this behaviour you might think of sub-classing String to provide methods that do alter the contents. but this isn't possible because the class is "final".
to see why, i think you have to look at how java passes arguments. machine-level values - ints, floats and the like - are passed by value. if you call foo.bar(i) then modifying the passed integer within the bar method won't alter the value of i (of course!).
however, if we pass an object into a method, where the object's contents are changed, then the effect will be seen outside the call. this is passing by reference:
class Foo { void changeStack( Stack inside ) { inside.pop( ) ; } }
Stack s ; s.push( new Object( ) ) ; System.out.println( s.size( ) ) ; // here s has size 1 Foo f = new Foo( ) ; f.changeStack( s ) ; System.out.println( s.size( ) ) ; // here s has size 0
again, this is obvious, but note that it is different to the way in which the machine-level values behave.
so how does this apply to String? unlike ints, literal strings (sequences of characters in quotes) are not machine-level values - they are String objects. so, in theory, passing "a quoted string" to a method might result in the string changing value!
class FooFoo { void changeString( String inside ) { inside.append( " world" ) ; // pretend this changes the String... } }
String s = "hello" ; Foo f = new Foo( ) ; f.changeString( s ) ; System.out.println( s ) ; // ...then this would be "hello world"...
f.changeString( "strange" ) ; // ...and what happens here?!
to avoid strange things like this last value (where a quoted string would change value) the java designers would either have to have make "quoted strings" machine-level values or introduce the idea of const objects (similar to C++).
instead, the pragmatic solution is to make sure that the Sting class can't change its contents - hence it is immutable and final.
and because String is immutable and final, it behaves as though it is passed by value, not reference.
one final comment: classes like Integer and Float behave in the same way. this avoids confusion, but also suggests that the compiler could make int and Integer equivalent (in the same way a "quoted string" and String are equivalent). this would make the language cleaner - i don't understand why this doesn't happen (i understand the performance advantages, but couldn't the compiler hide these from view, making int a compiler optimisation for the Integer class)?
Question: What is the Set interface?Answer: The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.

14. What is the List interface?
The List interface provides support for ordered collections of objects.

15. What is the difference between the File and RandomAccessFile classes?
The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file.

16. Collection classes in Java? Ordered and unordered and collection and duplicate items
17. util.concurrent package in java
18. Inheritance and constructor calling order
19. Exception handling in java
20. What is Class loader in Java
21. Reflection in Java

Monday, May 15, 2006

PM interview questions:

General Product Management:

1. Why do you want to move to Product Management?
Answer #1: I wanted to see the products I develop succeed. As a software engineer, and later a lead developer, I was deeply involved with how the product worked, but I was spending more time implementing than understanding the how and why of certain features appearing in Python on the screen in front of me. I was working as lead engineer at a startup company named Personal Spider when we missed the mark with a few product releases. I decided to move upstream and gather better requirements before sitting down to code with my team in a "measure twice, cut once" type of mentality. It led to better product, and I was hooked.

1 a. What is the role a Product Manager.
Answer: Product Managers will not be closely supervised. Little to no authority will be handed to PM. PM will not have direct managerial oversight for the people who work on your stuff. PM will be highly accountable for success or failure. As a PM it's very important to remember: a) Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. b) Communicate to different people in their own language and find out what motivates them.

1 b. How to get respect from engineers.
Answer: Clear obstacles, Always take the blame, Explain the why, Update engineers with the information about how the product is bringing money and business in the company.

1 c. How to get respect from sales?
Answer: Know their numbers, get on phone with customers, Make promises so don't have to.

1 d. How to get respect from executives?
Answer: Have a vision, Be patient, know your competition, make your commitments.

1 e. How do you estimate the work?
Answer: Rule of thumb for estimates:
- Likely estimate (L) "How long do you think it will take"
- Pessimistic estimate (P) "Ok, but what's the longest it could take, accounting for unforseen roadblocks?"
- Optimistic estimate (O) "What's the least amount of time required is everything goes well?"

[ O + (Lx4) + P ] / 6


2. What are the gretest skills of a Product Manager?

3. What are the draw backs of a Product Manager?

4. What are the Pros and Cons of eBay web site?

5. What metrics you will be using to monitor the features of the site.

6. Where do you want to see yourself in 2 years
Answer: Well ultimately that will depend on my performance on the job and on the growth opportunities offered to me. I have already demonstrated leadership characteristics in all of the jobs I've held, so I'm very confident that I will take on progressively greater responsibilities in the future. I enjoy being part of product and technology strategy and helping the company grow and simultaneously grow with the company. It's very rewarding.

7. What is the biggest advantage of having a technical background?
Answer: Having a technical background allows you to better determine what can realistically be accomplished by your team. You can dig deep into various ways of approaching a product or industry, emerge with some best practices, and sit down to build a product. A technical background creates better communication between managers and engineers while still letting each group apply their individual expertise.

8: What is the biggest disadvantage?
Answer: It's possible to geek out too much. The latest technologies, optimizations, and rewriting code bases from the ground up might sound great and exciting, but do they really help the bottom line? Will the average user notice the difference?

9. What was the biggest lesson you learned when you moved from engineering to product management?
Answer: I respected sales and marketing channels a lot more. I realized that building a great product is not enough, people need to learn why it's great and actually use the tool. Most releases won't be perfect right away, and I learned to adapt and change with the right inputs from my user base to create a better product.

# 10. What aspects of product management do you find the least interesting and why?
Answer: Politics and clamoring for resources is not too fun, but is present in most work environments. Ideally I would have infinite time and money with the best designers, engineers, sales, and business development people the world as to offer, but most often you're left cutting features and sacrificing ideals for reality.

#11. What is the difference between a BRD and a PRD?
Answer: The business requirement document is sometimes referred as the marketing requirement document (MRD). It discusses the requirements at a very high level from a business perspective. It describes the problem that need to be resolved, the market opportunity, and sometimes the competitor offerings. It justifies if a development project should be initiated. The business requirement document is not tie to any given development release and should avoid using the product specific terms. Sometimes the requirements are described in a such neutral way that you cannot tell which module or applications will be impacted. Actually, the business requirements are more like a RFP from some prospects. It is a user view of the solution.
The product requirement document is sometime referred as the product requirement specification or functional specification. It describes the expected functionality from a product. It is an outcome from the requirement analysis process. It interprets the business requirements by mapping and describing them using the product terminology. It is the document to communicate the business requirement to the product stakeholders. A product requirement document should be written with a product release in mind although not all features identified need to be scoped in. The key point is that the detail scoping decision can be made based on the product requirement document. It is the product requirement document identifies the scope of a development project. In the PMBOK, the product requirement document can be regarded as the scope statement for initiating a development project. It defines the features and is the product view of the solution.
At some stage, the product requirement should be baselined for functional design. It should be subject to the change control process for scope control. Scope creeping can thus be avoid. However, it worth mentioning that the requirement analysis is a iteration process. You should not be too rigid on changing the product requirement during design phase. You should not feel hesitate to contact customers to clarify the requirement.

#12. What are the steps and process when we want to design a new process.


eBay Product Management

#1 : What is the Global Product Planning process?
Answer: The Global Product Planning Process is the collection of steps required to move an initiative from concept through to scheduling on the roadmap. These steps or "phases" are: Concept> BRD> Scoping> NPV> Approval> Committed> Launched.
In the Concept phase, Product Management and the Business Units work together to vet the good ideas. The goal of this phase is to do the up-front work necessary to determine if a feature is a solid business idea with feasible implementation options. Once an idea is vetted and preliminarily approved, the Business Partner submits a Business Requirements Document (BRD) to the Product Manager. In the Scoping Phase, the Product Manager uses the BRD to craft a scope request. The scoping team then estimates the resources required to support the initiative. The Business Partner for the initiative then drives it though NPV process - a set of calculations (done in cooperation with the Finance Rep.) to determine the NPV and Fit score of the initiative in preparation for the presentation to the Product Evaluation Subcommittee. The Product Evaluation Subcommittee reviews all initiatives and gives them either an approved ("Green/Green") status or a not approved status. Any Product Evaluation Subcommittee-approved projects go into the queue for an overall ranking and scheduling. Any projects that are not approved are sent back through the process or eliminated. Once all the approved initiatives are ranked, Product Management and Design Labs resources are assigned, PRD dates are established, and Product Development resources are booked. The completed Product Roadmap, including LTS dates, is then presented to Product Council and to Executive Staff for approval

#2: My feature has been scoped. What are the next steps?
The PM is responsible for communicating the scope back to the BU. Assuming that the BU decides to move forward with this initiative as defined and scoped, they would take this through the NPV process. Often the BU decides that they would like to try a different approach and will resubmit this initiative, slightly modified, for rescope.
Occasionally, when a scoping estimate is returned, the BU decides to try a different approach to the project and will request PM to resubmit this initiative, slightly modified, for rescope. If a project team does not go with the first official scoping estimate for a feature, it is critical that the rescope data is captured to accurately reflect the scope that the team decides to use. For example, any requests for rescopes or notes from offline conversations with the original scoper must be officially submitted to the scoping alias. Or if a team decides to select a subset of the scoped features, the data must also be submitted to the scoping alias so that, when the time comes, the feature can be scheduled accordingly.

#3: What is the NPV process and how do I get my project through it?
The Net Present Value (NPV) process is driven by the Business Unit with the goal of identifying the costs and benefits of a given feature. The Business Partner is responsible for collecting the data that feeds into the NPV calculations and working with their Finance Rep to come up with both NPV for a given project as well as a Fit score.
Product Managers are expected to work with their Business Partners to help provide some of the data needed to run the NPV numbers. Once a project has been scoped, a Product Manager should make sure to communicate scope estimates to the sponsoring BU and to keep track of whether the BU plans to do NPV and what the status is.

#4: What is a Fit score?
A Fit score attempts to capture the more qualitative aspects of an initiative; fit from a Strategic, Community, Product Principle, User Experience, and Technical Complexity perspective

#5: How are projects booked?

Once features have been scoped, through the NPV process and approved, they are eligible for booking resources.
New Initiatives
We typically book PD resources based on the information provided in the scope document. We will get as detailed as we can (in terms of PD components, for example, XSL, Isapi, Search, Batch, etc.) based upon the information available to us in this document. The scope document is (by design) high level, so we may not have all the project details at this point in the process. (Based upon past projects, Project Managers may often have much more detail on what is required than Global Product Planning does when booking.)
In addition to PD scoping, we collect "high", "medium" & "low" impact estimates from DataWarehouse and Ops, and a Yes/No on whether JAD is required from Architecture. Once PD resources have been booked we circle back with these groups to ensure that they know when PD plans to deliver their components. As each group moves forward with planning their own upcoming roadmap they will have pertinent data such as PRD dates, development dates, and LTS dates for each initiative and will take this all into consideration while solidifying their own plans.
Once a project is approved, it's also booked by Deisgn Labs. DL works with Product Management and GPP to identify what the priority, possible dependancies and target dates are. The project is then allocated to resources on User Interface, Usability and Creative resource maps and a target PRD date is established.
Existing Projects For existing (meaning previously booked) projects requiring new or additional resources, the project manager should work directly with the development managers for resource allocation. If trade offs are required on one manager's resource map in order to book this initiative, the project manager can take a list of trade offs and impacts back to the product management group & Lynn as applicable. If this initiative cannot be booked without impacting multiple resource maps the project manager will then need to raise this issue as an agenda item for the Thursday planning meetings.
Within the Thursday planning meeting such issues are discussed that cannot be resolved offline as well as new initiatives, escalations, etc. Development managers are present and decisions regarding booking, tradeoffs, etc can be made during the meeting. Often times decisions regarding VP or BU input are listed as action items to be resolved shortly after each meeting. The results of each meeting are published and the Tracker tool updated to reflect the decisions made.
When components aren't complete for an initiative, Project Managers should work with Global Product Planning to get the remaining components added. Once we know what we need and how many train seats we can work on booking.

#6. How eBay makes money:
When you sell an item on the site, eBay takes a cut of the profits you make
eBay fees:
Insertion Fees
Final value fees
Reserver fees
Buy it now fees
Listing upgrade fees
eBay Picture service fees
Seller Tool fees
Ad Format Fees
eBay Motors Fees
eBay Stores Fees
Real Estate Fees
PayPal Fees
Paying your eBay Seller's Fees
Invoicing Procedures and Payments

eBay’s Info
• Confirmed Registered Users — eBay cumulative confirmed registered users at the end of Q1-06 totaled 192.9 million, representing a 31% increase over the 147.1 million users reported at the end of Q1-05.
• Active Users — eBay active users, the number of users on the eBay platform who bid, bought, or listed an item within the previous 12-month period, increased to a record 75.4 million in Q1-06, a 25% increase over the 60.5 million active users reported in Q1-05.
• Listings — eBay new listings totaled a record 575.4 million in Q1-06, 33% higher than the 431.8 million new listings reported in Q1-05.
• Gross Merchandise Volume (GMV) — eBay GMV, the total value of all successfully closed items on eBay’s trading platforms, was $12.5 billion in Q1-06, representing an 18% year-over-year increase from the $10.6 billion reported in Q1-05. Excluding the impact of foreign currency translation, Q1-06 GMV increased 22% year over year.
• Fixed Price Trading — eBay’s fixed price trading contributed approximately $4.3 billion or 34% of total GMV during Q1-06, primarily from eBay’s “Buy It Now” feature.
• eBay Stores — At the end of Q1-06, eBay hosted approximately 486,000 stores worldwide, with approximately 247,000 stores hosted on the US site.

EBay reported record consolidated net revenues of $1.390 billion in Q1-06, representing a growth rate of 35% year over year which is primarily due to continued Marketplaces and PayPal growth. Net revenues were negatively impacted by foreign currency translation of approximately $50.2 million in Q1-06 as compared to Q1-05. On a sequential basis, consolidated net revenues were positively impacted by foreign currency translation in Q1-06 by approximately $8.3 million.


#7: What is eBay affiliate program?
Answer: eBay affiliate program drive ACRU's (ACRU – Active Confirmed Registered Users (bid, list, or buy within 12 months). The eBay Affiliate Program pays Internet publishers, Web masters, and other online partners to drive new users to eBay. Affiliates promote eBay with banners, text links, and other innovative tools, such as the Editor Kit and the Flexible Destination Tool. In return, they receive commissions for driving new users as well as bids and "Buy It Now" purchases. Affiliates earn from $5.00 to $13.00 for each new active user and from $0.05 to $0.09 for each bid or "Buy It Now" transaction. Currently, the top 25 affiliates in the program average above $100,000 in monthly commissions.
Joining the eBay Affiliate Program is free.

Friday, May 12, 2006

PM interview prep material:

1. Study all the eBay site related information.
2. What are the benefits of all the features.
3. Compare the features of eBay, Yahoo, Google, MSN, Amazon
4. What are the measurement metrics
5. What are the current issues.


Resources:
1. Study the following blogs:
EBay Blogs
Jason Steinhorn
eBay Strategies
Google Info
Will Hsu

2. Study Amazon, Google and Yahoo related blogs

Monday, May 08, 2006

Interview preparation:

Java:
1. Effective Java
2. The Complete Ref
3. Java Almanac
4. Java Forum at http://www.javaworld.com/javaforums/ubbthreads.php?Cat=2&C=2
5. Concurrent Programming in Java
6. Reflection
7. Regular expression


C++
1. Scott Mayor: Effective C++
2. C++ FAQ
3. C++ Programming with design pattern
4. STL basics
5. Object created in the heap vs the object created in the stack.
6. Heap fragmentation and Stack overflow
7. Thread locks: Semaphore, Mutex
8. Copy constructor and Operator overloading
9. Virtual destructor
10. Diff between new, malloc and delete
11. DataStructure: heap, stack
12. Sorting algorithms
13. Multiple inheritence and issues with multiple inheritence.
14. Issues with delete this
15. Is-a and has-a relationship
16. Inhertance vs aggregation


OS/Linux:
1. Command and debbuging.

DB
1. MySQL
2. Nornalization, Indexing, Inner and Outer join

Data Structure:
1. Array, Link List, Vector, Queue, Trees (B/Binary), Hashtable, Hash Map
2. How to traverse a tree.
3. Hashtable: Hashing function, Linear probing

Sorting and Searching:
1. Bubble sort, Shell sort, binary sort, Heap sort, Merge sort
2. Write a program to merge a sorted list.

Misl:
1. Threading Models
2. Thread signalling
3. Sync mechanism: Mutex/Semaphore

Tuesday, May 02, 2006

GMAT Prep Tips and feedback from others
1. Following post is by By Twinsplitter at:
http://www.urch.com/forums/just-finished-my-gmat/26097-790-q50-v51-4.html

Haha at first I thought exactly the same thing, especially because I knew that I didn't have any conceptual problems with the stuff on the test and so it must have been a stupid mistake. But then again, I can never manage to make it through an entire quant section without making a stupid mistake, so I wasn't really surprised. What did surprise me tho is that I did better in Verbal than in quant, as quant has always been my strength. But anyways, it's probably a good thing I missed 800 since Stanford takes some sick sort of pride in the fact that they rejected every 800 applicant last year. Still, I do agree that this site will see an 800 soon, especially if Grey ever takes the test again

Disclaimer:I'm sorry if this post is a bit convoluted or too long, I just figured that since many people (especially those new to the site) use these debriefings as a guide, I would put a lot of the great resources from
this site together in one, easy to find spot for them and for everyone else on this site. However, I have tried to make the transition between each section clear (by using boldface), so that if you want to only find my advice on particular sections then it will be easier.
Disclaimer #2: Before I get started on prep strategy, I want to note that I took the LSAT before I took the GMAT, and thus while it may seem like I have not prepped much for CR and RC, it is because I felt that prepping for the LSAT was more than sufficient prep for these two sections. "But I'm not taking the LSAT, so how does this advice help me" you ask? Read on...

Starting Out:
Originally, I had planned to start prepping for my GMAT as soon as I finished the LSAT, which was in early February (in fact I think it was February 12th, exactly 3 months before my GMAT). However, I was exhausted after prepping for the LSAT, and so I decided to wait until I was finished with Winter quarter
finals in mid March.
I had already been frequenting this site for quite some time at that point, and so I knew that starting off with PowerPrep was a great way to know your standing. I took PP1 and the results were: 710 (q47, v40)

Upon looking at the questions I missed, I realized that in quantitative, as is the case for most people, I was mostly hurt by stupid mistakes. However, I had finished that section 15 minutes early, and I knew that if I properly distributed that extra time then I would be in much better shape. Nonetheless, I realized that I was more rusty than I would like in some areas, and so I decided that quant would be the first area I would work on.
In verbal on PP1, I did not get any CR or RC questions wrong. Yup, that's right, I dropped to a v40 SOLELY based on SC. Needless to say, I realized SC was a big weakness of mine that I needed to work on. However, I
think that SC is probably the easiest section to improve your skills in, as a large percentage of it is just memorizing the necessary rules.

My General View on Prep:
I liken prepping for these tests to an athlete preparing for the season. Rather than sort of work each muscle each day, they specifically target one muscle at a time, spending one day doing bicep only workouts, another doing chest workouts, etc. In the same way, I believe that you should target each specific aspect of the test, concentrating on it and really getting in the mode for it, then moving onto the next type of question. However, when you move on, still do 10 questions a day for each previous section you've done. So, for example, if you start off with quant, then two weeks later you focus on SC while doing 10 quant questions a day. Then, when you move on to CR, you do 10 quant questions and 10 SC questions a day, while still keeping your main focus on CR. Note that using this method, you will be spending progressively more time as you get closer to the test, which is probably a good idea anyways.

I think that your knowledge of each subject will become much more solid in this way than it will in the wishy washy way of just doing a little bit of everything all the time. Then, once you start getting closer to the test (i.e. perhaps two weeks before), and after you've targeted each specific section and feel you're sufficiently prepared, then just work on all of them together, the same way an athlete starts doing more general stuff rather than working out once he/she gets closer to game day.

How to Decide Which Aspects to Target First and For How Long:
I believe that, in general, 2 weeks on a specific subject will give you an absolutely solid grasp on it. However, if there are some sections that you feel need more work than others (i.e. if you're strong in CR but weak in SC), then you could spend only one week on the one you're strong at and 3 weeks on your weakness.

In my opinion, it is best to put quant first for two reasons:
1) this site has a lot of great quant questions/resources, and it's easier to utilize them if you're caught up and fresh in quant,
2) Quant is the easiest to keep fresh by doing a few problems a day, so if you put it in the beginning then you still probably won't forget most of it by the time the test comes around.
As far as what to put second, I believe that it is best to put your biggest weakness in verbal second. Why? Because the topics you put near the beginning will be the ones you get the most practice on, since you'll spend 2 weeks targeting them and then will also do 10 questions a day in these topics from
then on.

In other words, here's the prep plan I would recommend to most people:
Quant (2 weeks)
Biggest Verbal Weakness (2-3 weeks)
2nd Biggest Verbal Weakness (2 weeks)
Verbal Strength (1-2 weeks)
All Types of Questions, General Prep, and Practice Tests (2 weeks)
For a total of about 10 weeks.

My own prep was a little different from my recommended, namely in that I didn't prep for CR and RC and thus only targeted two types of questions (quant and SC). However, as I said before, I basically had already targeted CR and RC by preparing for the LSAT.

My prep went as follows (spread over 8 weeks, with two weeks of non-prepping because I had midterms):
Quant (2 weeks)
SC (2 weeks)
General Prep (2 weeks)

While I certainly spent a good amount of time preparing for this test, I didn't do some amazing number of hours (i.e. Ursula's 200 hours). I did about an hour a day on weekdays (not including time spent on TestMagic, which I found to be a great way to procrastinate!), and around 5 hours a day on weekends for a total of about 90 hours. However, if you include time spent on CR and RC for the LSAT, which was about 60 hours, then it totals to 150 hours. I really would have liked to spent more time preparing, but I knew it was impossible, since the University of Chicago is famous for its enjoyment in torturing undergraduates with a ridiculous amount of work (the school's nickname is "where fun comes to die", or "the level of hell daunte forgot").
Note: Any time I found some helpful information on this site, I copy and pasted it into a word document. In general I think this is a good way to keep track of all of the important stuff you see on the site. And, because I did that, now I have a ton of stuff to share with you guys (see resources for each section).

How I Targeted Each Section

Quant:
General Strategy: My prep for quant consisted of three parts (in this order):
1) Going through
Kaplan's Math Workbook, underlining all of the important concepts, making notecards of these concepts, and doing the practice problems to strengthen these concepts.
2) Scouring TestMagic for all of the great resources that I knew it had on quant, and making notecards of the concepts in these resources. (resources listed below).
3) Doing tons of quant problems from my many question sources (sources listed below).

I think the most important thing in quant is knowing how to set up an equation from a word problem. If you can do this, you will get 95% of your quant questions right, guaranteed. How can you get good at this? Through practice.
See my list of sources of quant questions below to see where you can get practice at this.

Probably my biggest weakness starting out in quant was number theory, as I believe is the case for many people. My advice on cracking this type of question would be to do several of these problems, because it's really just the kind of thing that you get better at with practice. There are several great number theory problems on this site, as well as in the sources I'll list below. As you do more of them, you just get a knack for knowing how to go at it.

Here's how I went at number theory problems: First, I would try to use mathematical logic to lead me to the correct answer. Most of the time, this would work, and I would pretty much know what kind of numbers are relevant to the question (i.e. negative fractions, positive intergers). I would then think what would occur with these types of numbers, and this would lead to the answer.

However, if I was unable to crack it using mathematical logic, I would simply try to plug numbers in, using Alakshma's strategy of plugging in (-2, -1, -0.5, 0, 0.5, 1, 2).

Generally, I would come to the answer sooner or later.
For permutations and combinations, I initially spent way too much time on them (hence the plethora of probability and comb/perm links below) but then realized that I need to take everyone's advice and stop paying attention to them so much. All of you would be well advised to do the same! There's much more
important things to spend your time on.

For Statistics, as I said, I just took a class on it last quarter and thus didn't prepare much for it. However, even had I not taken the class, I still feel that most statistics on the GMAT is fairly easy, perhaps because they know
that most people don't really know the concepts in statistics. So just learn the basic concepts (i.e. what a median is, the fact that standard deviation measures spread, how it is calculated--although I doubt you'll actually have to calculate it, it is helpful to understand how to get it when trying to analyze
what it means).

Sources of Quant Questions:
1)
Kaplan's Math Workbook did every problem in the book
2)
Kaplan 2005 (with the CD)
did every problem in the book, as well as all the Problem Solving and Data Sufficiency Tests on the CD. However, I didn't do any of the CAT full length tests, which I'll discuss in practice tests.
3)
Official Guide only did the questions categorized as hard bin by this document.
4) I bought
Kaplan 800 but never ended up having enough time to get to it. However, I've heard great things about it, and would thus recommend getting it.
5)
TestMagic--Quant Section. Like Grey said, if you search all topics started by Nuthan in the DS section, you'll get hundreds of DS questions to practice on. Also, searching posts made by Lego, Grey, and Shaq can be a great way to find the best problems on this site, and it will also show you how the math geniuses approach
problems.
But while we're on the subject of math geniuses--don't be intimidated if they come up with
brilliant solutions you never would have thought of. Many of the quant questions on this site are much more difficult than what you'll see on the real GMAT.

Quant Resources (note--I probably shouldn't even include all the comb/perm stuff on here b/c I know you guys will spend too much time on it then , but I figure if you're going to waste your time on it, might as well have an easier time finding the stuff ):

Must Have:
Great Math Review
Arithmetic and Geometric Progressions
Overview of Combinations
Overview of Permutations
HCF and LCM Stuff -- The beginning is simple, but further down there are some helpful tricks I didn't know about
Venn Diagram
-- check out my post second from the bottom on the first page. Has everything
you need to know about 3 category sets.

Note: For two category sets, it's simply P(AuB) = P(A) + P(B) - P(AnB)

Everything You Need For Prob/Comb/Perm
Compilation Of Prob/Comb/Perm Questions
Compilation of Tough Problems

Also Helpful:
How to do well in quant
Basic info on standard deviation (math reference in Kaplan tells you how to calculate it)
Info on Probability
More Permutations
More Combinations
More Prob/Comb/Perm
A
ngles and Arcs

Sentence Correction
General Strategy: As I said when discussing my PP1 results, I only got around 65% of these right on my first test. By the time of the test, I averaged 1 wrong out of every 100 questions. Here's how I improved so much:
First thing I did was buy
Manhattan GMAT's Sentence Correction Guide. While it's true that, as everyone says,
OG
is the bible for practicing verbal, I would say that this book is the bible for learning the rules of SC. This book is so comprehensive it's amazing. I cannot emphasize enough what an important role this book played in achieving my score. Also, the friend I told you about who got a 750 without studying did actually spend a couple of days studying. The only thing he studied was this book, and as a result his verbal score jumped from 40 on PP1 to 44 on the actual GMAT.

Here's how to utilize the book:
First, go through Manhattan GMAT's SC guide, highlighting every important point (which, in my opinion, is almost every point in the book) and then making notecards out of those points. Memorize them every chance you get (I did this whenever I rode the bus). At the end of each chapter, Manhattan GMAT lists a set of problems in OG which test the concept you learned about in that chapter. Doing the problem set knowing what type of error you're looking for will make you adept at noticing that problem.
Then, once you have gone through every chapter in Manhattan GMAT, and done the corresponding problems in OG, do OG again, starting from problem number 1. This time, you won't know what type of error you'll be
looking for, but you'll have become so good by doing the problem sets that you will start noticing that you've gotten MUCH better at SC.
Regarding doing the problems in OG more than once: I remember someone saying in their debriefing that as long as you're not memorizing the answers in OG, you can do the problems over again, and you can also take PP and have it be an accurate predictor. I couldn't agree more. Read the explanations, but don't memorize them, so that you can practice as much as possible on real GMAT questions.
One final note: I never ended up using the 1000 SC doc because I found that repeating OG was enough, but
if you feel like you're running out of questions, there are several great questions in 1000 SC as well as in the FREE ETS paper tests that I'll provide links to later.

Resources for SC:
Spidey's SC Notes
1000 SC's
Grammar Reference Didn't use it myself, but looks pretty comprehensive for anyone who wants to check it out.

Critical Reasoning
General Strategy: The way I approached CR problems was much different than the way Kaplan (and most books) recommend it. Unlike most people, I don't read the question stem before I read the stimulus. Rather, I read the stimulus first, trying to get a thorough understanding so that regardless of what the question is, I'm ready to attack it. I really think that this helped build my logic skills, so that I was better prepared for any kind of CR question than I would have been if I had a more question-type-specific approach. I feel that had I tried to read the question first, I'd be so focused on trying to find the assumption/implication that I wouldn't understand the argument as a whole intricately enough to analyze the answer choices appropriately. One reason I trusted this approach is that TestMasters, the company known for being the best LSAT prep course, recommends it (and the LSAT is 1/2 CR, so you figure an LSAT prep course would be particularly privy to how to approach the problems). However, each person should take the approach they feel is best!

Recommended Prep Approach:
I think that the reason I was so good at CR is because, as I said above, the LSAT is half CR, and its CR questions are MUCH more difficult than those on the GMAT. They are extremely nitpicky, which helps you become very logical and helps you spot the errors in GMAT arguments in a second. Thus, I would recommend buying the

"Next Ten Actual, Official LSAT PrepTests"
, which contains 500 LSAT CR questions. If you don't want to buy the book but still want a few LSAT questions, download this free LSAT test.
Do those when you're targeting your CR skills, and then start doing the CR in the OG once you start getting closer to the test (just to get used to the GMAT's style of CR). As far as boldfaced questions, I didn't specifically prep for them, although the LSAT contains some questions which are similar (argument structure questions). Like others have said, process of elimination is pretty helpful in the boldface.
For those of you still looking for boldface questions, I heard that akasans has posted a lot of boldfaced CR's on the site.
Resources for CR:
I don't have any, I'm sorry

Reading Comprehension
General Strategy: I don't really have much of a strategy on reading comprehension, I just sort of read it and answer the questions. One thing that I found was that reading on the computer was very easy for me, perhaps because I read articles online all the time. Many people suggest using the economist online, but that costs $$. Instead, check out
McKinsey Quarterly, which will help your ability to read on a computer screen, your knowledge of business examples (if you get a business issue on AWA), and will probably help your career too by making you knowledgeable on several business issues!
One thing which I think helped me a lot on both my RC and
AWA was the fact that I read the editorial section of the Wall Street Journal every morning on the way to school. It does several things for me:

1) Exposes me to complex arguments similar to those in RC and CR
2) Gives me practice reading on topics which I am often unfamiliar with
3) Keeps me informed, so that I have more real life examples to use in

AWA
.
Finally, perhaps my most important piece of advice on RC is to use the RC's that come in that LSAT book (linked above in the CR section) as practice. The LSAT passages are much more complex, and the questions are much more specific, so that you'll be forced to get better at remembering what you read! Use the LSAT book when targeting RC, and then as the test nears, start doing the OG RC's.

Resources for RC-- I'm not sure regarding the quality of any of these because I haven't gone through them, but I did copy good links whenever I saw them in case I needed more practice for RC, so I figured I might as well share
Ten Vocabulary Learning Tips if you feel like not knowing some of the words in the RC's is hindering your
ability to do well (although it's very normal not to know some of them).
More RC Materials
Even More

Analytical Writing Assessment
General Strategy: Spend a couple days before your test thinking of some big fancy words (my words of choice were eludicate, juxtapose, paucity, dearth, and some other ones that I have now forgotten), as well as some real life examples. I have found that if you have 6 real life examples, odds are 3 of them will be moldable (if that's a word) to become relevent to your topic in analysis of an issue. Attached are my

AWA
templates (sorry Stormgal, I only know how to attach things in threads!). They are essentially a hybrid of Erin's, Sybersport's, and several other templates that I have found on this site.
As far as prep for
AWA, I didn't have any. I simply checked a couple topics out, thought about what I'd say for them to get my mind in the writing mode, and that's about it. However, if you would like a book to build your
AWA
, Spiderman recommended this book which seems like it would be helpful because you can see how others approach it and steal some of their arguments!

Resources for AWA:
Erin's Template for Analysis of an Issue
Template for Analysis of an Argument
Sybersport's (who got a 6.0) Advice
Formatting Rules (makes the grader nice to you!)

More General Resources
There's tons of good (free) stuff I found through TestMagic! Here it is:
All 9 Paper Tests
Calculating Paper Test Scores
OG Softcopy
Free Manhattan GMAT CD
Categorization of OG Questions (I know I've linked to it already, but just wanna make sure everyone gets it, it's really helpful!)
Too many resources to name
Answer Grid that Times You
Prep Strategy Site
Prep Strategy Site #2
Prep Strategy Site #3

Timing:
I didn't put much effort into working on timing, mostly because the LSAT is far more time constrained than the GMAT and I was thus able to work very quickly on everything. In other words, by working in high-pressure, time-constrained situations, my timing got better. Thus, I would recommend doing the same, e.g. only giving yourself 15 minutes to do 10 problems rather than 20 minutes. However, only do this once you know the concepts, because otherwise what's the point of going quickly when you don't even know what it is that you're doing quickly!
I think Kaplan's CD is really good for improving timing in Quant...while giving you only 25 minutes for 20 DS questions may seem ridiculous, it sure makes the actual GMAT, with 2 minutes per question, seem much easier.
Practice Tests:
I know it's really helpful to see what people's practice test scores were so that you know where you stand relative to them. Unfortunately, I don't have many practice scores to give you guys! I knew my timing was alright, and so I felt that doing more problems and learning more concepts was more beneficial for me than doing more practice tests. But again, this is pretty unique to my situation because the LSAT had improved my timing so much. For most people, I would recommend taking SEVERAL practice tests.
Anyways, here's the scores on the tests that I did take:
PP1 (before any prep): 710 (q47, v40)
PP2 (after targeting math and SC): 780 (q50, v47)
Kaplan diagnostic--the one in the book: 700 (q49, v45). Don't know how the hell this score breakup comes out to a 700, but I didn't care b/c I knew Kaplan's tests were horrible.

Day Before the Test:
Unlike most people, I didn't go out to dinner or relax the day before my test. Instead, I did several practice
problems, because I noticed that whenever I would take a couple days off from the GMAT, my mind would get out of the GMAT mindset. So, as I've said earlier, do what you feel best fits your own situation!

Hit Rates:
Problem Solving (in the beginning, when I was making stupid mistakes): 90%
Problem Solving (once I got better at preventing stupid mistakes): 97%
Data Sufficiency (when making stupid mistakes): 85%
Data Sufficiency (once I got better at preventing stupid mistakes): 93%
Sentence Correction (first time around, going category by category as assigned by Manhattan GMAT's book): 95%
Sentence Correction (second time around): 98-99%
Critical Reasoning (did about 80 q's from
OG): 95%
Reading Comp: Only ones I did were on the practice tests, and I think my hit rate was around 97%.
Note, however, that pre-LSAT, my CR was around 84% and my RC was 92%, so don't be discouraged if yours are below mine. Also, for SC, remember that my hit rate before Manhattan GMAT was 65% on that one test. So regardless of where you're at, you can get much better by prepping appropriately.

Future Plans
This fall, I am planning on applying to the three top schools which occassionally accept college seniors without work experience: Stanford, Harvard, and Columbia. I am hoping that this GMAT score, my GPA, the fact that my school is pretty good, my extracurriculars, and my internships will be enough to make me part of the 2% of the entering class that these schools accept without work experience. And if not, the University of
Chicago GSB has a special program for undergraduates at the U of C, in which students apply as seniors, and if they are accepted then they get deferred acceptance, working for two years and then returning after that.

GMAT:

The following are the links that I got from:
http://thefamilyguymba.blogspot.com/2005/04/gmat-experince.html

http://www.syvum.com/gmat/http://atheism.about.com/od/logicalfallacies/a/overview.htm http://daveformba.blogspot.com/http://richardbowles.tripod.com/gmat/gmatmenu.htm http://www.test-preps.com/gmat/math_test_sol.php http://novapress.net/gmat/strategies.html http://www.novapress.net/gmat/math.html http://education.kulichki.net/GMAT/math1.html http://www.gmatbuster.org/http://novapress.net/gmat/math.html http://s2s.wharton.upenn.edu/wh-wharton/messages?msg=5423.1 http://geethu.blogspot.com/2004/06/studying-for-gmat.html http://www.crack-gmat.com/gmat-test.htm http://www.testmagic.com/forum/topic.asp?TOPIC_ID=11279 http://www.testmagic.com/forum/forum.asp?FORUM_ID=67 http://www.microedu.com/gmattest/freetest.htm http://mbaleague.blogspot.com/http://mbawire.blogspot.com/2003_06_29_mbawire_archive.html http://www.krysstal.com/binomial.html http://mathforum.org/dr.math/faq/faq.divisibility.html http://www.gmatclub.com/phpbb/viewtopic.php?t=8202 http://gmat.prepedge.com/MBA/GMAT-CAT/questionbank/ http://s2s.wharton.upenn.edu/n/mb/message.asp?webtag=wh-wharton&msg=7849.1 http://education.kulichki.net/GMAT/math.html http://www.800score.com/gmat-home.html http://www.800score.com/guidetc.html http://www.ascenteducation.com/india-mba/iim/cat/questionbank/Archives/April2002/arith1704.shtml http://www.gmattutor.com/tricks2.html http://www.800score.com/guidec8bview1a.html http://www.economist.com/research/StyleGuide/ http://www.sentencecorrection.com/forums/index.php?act=idx http://novapress.net/gmat/data-sufficiency.html http://www.deltacourse.com/


Some additional links:
1. RC resource:
http://www.aldaily.com/

2. Verbal and Analytical question bank:
http://www.urch.com/forums/archive/index.php/f-111.html
3. Score Top:
http://www.scoretop.com/
4. Deltacourse use debankur as a login name and usual password: http://www.deltacourse.com/gmat/gmat-login.asp

Technical Questions For Computer Science Programmers

1. Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or orientation), how would you cut the remainder of the cake into two equal halves with one straight cut of a knife ?

2. You're given an array containing both positive and negative integers and required to find the subarray with the largest sum (O(N) a la KBL). Write a routine in C for the above.

3. Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].

4. Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all. [ This one had me stuck for quite some time and I first gave a solution that did have floating point computations ].

5. Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

6. Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

7. Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

8. How many points are there on the globe where by walking one mile south, one mile east and one mile north you reach the place where you started.

9. Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution).

10. What are the different ways to say, the value of x can be either a 0 or a 1. Apparently the if then else solution has a jump when written out in assembly. if (x == 0) y=0 else y =x
There is a logical, arithmetic and a datastructure soln to the above problem.
11. Reverse a linked list.
12. Insert in a sorted list
13. In a X's and 0's game (i.e. TIC TAC TOE) if you write a program for this give a gast way to generate the moves by the computer. I mean this should be the fasteset way possible. The answer is that you need to store all possible configurations of the board and the move that is associated with that. Then it boils down to just accessing the right element and getting the corresponding move for it. Do some analysis and do some more optimization in storage since otherwise it becomes infeasible to get the required storage in a DOS machine.

14. I was given two lines of assembly code which found the absolute value of a number stored in two's complement form. I had to recognize what the code was doing. Pretty simple if you know some assembly and some fundaes on number representation.

15. Give a fast way to multiply a number by 7.

16. How would go about finding out where to find a book in a library. (You don't know how exactly the books are organized beforehand).

17. Linked list manipulation.

18. Tradeoff between time spent in testing a product and getting into the market first.

19. What to test for given that there isn't enough time to test everything you want to.

20. First some definitions for this problem: a) An ASCII character is one byte long and the most significant bit in the byte is always '0'. b) A Kanji character is two bytes long. The only characteristic of a Kanji character is that in its first byte the most significant bit is '1'.
Now you are given an array of a characters (both ASCII and Kanji) and, an index into the array. The index points to the start of some character. Now you need to write a function to do a backspace (i.e. delete the character before the given index).

21. Delete an element from a doubly linked list.

22. Write a function to find the depth of a binary tree.

23. Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
24. Assuming that locks are the only reason due to which deadlocks can occur in a system. What would be a foolproof method of avoiding deadlocks in the system.
25. Reverse a linked list.
26. Write a small lexical analyzer - interviewer gave tokens. expressions like "a*b" etc.
27. Besides communication cost, what is the other source of inefficiency in RPC?
(answer : context switches, excessive buffer copying). How can you optimise the communication? (ans : communicate through shared memory on same machine, bypassing the kernel _ A Univ. of Wash. thesis)
28. Write a routine that prints out a 2-D array in spiral order!
29. How is the readers-writers problem solved? - using semaphores/ada .. etc.
30. Ways of optimizing symbol table storage in compilers.
31. A walk-through through the symbol table functions, lookup() implementation etc - The interv. was on the Microsoft C team.
32. A version of the "There are three persons X Y Z, one of which always lies"..
etc..
33. There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner.. what is the probability that they don't collide.
34. Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
35. The if (x == 0) y = 0 etc..
36. Some more bitwise optimization at assembly level
37. Some general questions on Lex Yacc etc.
38. Given an array t[100] which contains numbers between 1..99. Return the duplicated value. Try both O(n) and O(n-square).
39. Given an array of characters. How would you reverse it. ? How would you reverse it without using indexing in the array.
40. GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
41. Fundas of RPC.
42. Given a linked list which is sorted. How will u insert in sorted way.
43. Given a linked list How will you reverse it.
44. Tell me the courses you liked and why did you like them.
45. Give an instance in your life in which u were faced with a problem and you tackled it successfully.
46. What is your ideal working environment. ( They usually to hear that u can work in group also.)
47. Why do u think u are smart.
48. Questions on the projects listed on the Resume.
49. Do you want to know any thing about the company.( Try to ask some relevant and interesting question).
50. How long do u want to stay in USA and why?
51. What are your geographical preference?
52. What are your expecctations from the job.
53. Give a good data structure for having n queues ( n not fixed) in a finite memory segment. You can have some data-structure separate for each queue. Try to use at least 90% of the memory space.
54. Do a breadth first traversal of a tree.
55. Write code for reversing a linked list.
56. Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).
57. C++ ( what is virtual function ? what happens if an error occurs in constructor or destructor. Discussion on error handling, templates, unique features of C++. What is different in C++, ( compare with unix).
58. Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list).
59. GIven 3 lines of assembly code : find it is doing. IT was to find absolute value.
60. If you are on a boat and you throw out a suitcase, Will the level of water increase.
61. Print an integer using only putchar. Try doing it without using extra storage.
62. write C code for deleting an element from a linked listy traversing a linked list efficient way of elimiating duplicates from an array
63. what are various problems unique to distributed databases
64. declare a void pointer a) void *ptr;
65. make the pointer aligned to a 4 byte boundary in a efficient manner a) assign the pointer to a long number and the number with 11...1100 add 4 to the number
66. what is a far pointer (in DOS)
67. what is a balanced tree
68. given a linked list with the following property node2 is left child of node1, if node2 < node1 els, it is the right child.
O P O A O B O C
How do you convert the above linked list to the form without disturbing the property. Write C code for that.
O P O B / \ / \ / \ O ? O ?
determine where do A and C go
69. Describe the file system layout in the UNIX OS a) describe boot block, super block, inodes and data layout
70. In UNIX, are the files allocated contiguous blocks of data a) no, they might be fragmented how is the fragmented data kept track of a) describe the direct blocks and indirect blocks in UNIX file system
71. Write an efficient C code for 'tr' program. 'tr' has two command line arguments. They both are strings of same length. tr reads an input file, replaces each character in the first string with the corresponding character in the second string. eg. 'tr abc xyz' replaces all 'a's by 'x's, 'b's by 'y's and so on. a) have an array of length 26. put 'x' in array element corr to 'a' put 'y' in array element corr to 'b' put 'z' in array element corr to 'c' put 'd' in array element corr to 'd' put 'e' in array element corr to 'e' and so on.
the code while (!eof) { c = getc(); putc(array[c - 'a']); }
72. what is disk interleaving
73. why is disk interleaving adopted
74. given a new disk, how do you determine which interleaving is the best a) give 1000 read operations with each kind of interleaving determine the best interleaving from the statistics
75. draw the graph with performace on one axis and 'n' on another, where 'n' in the 'n' in n-way disk interleaving. (a tricky question, should be answered carefully)
76. I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.
77. A real life problem - A square picture is cut into 16 sqaures and they are shuffled. Write a program to rearrange the 16 squares to get the original big square.

Programming Questions:

This is a summary of the questions I got in 9 in-person interviews with 5 companies and about 10 phone screens 8/02-11/02.
The interviews were pretty evenly split between very large, large, and startup-sized tech companies.

The good news is that interview question repertoire is generally very limited.
The
Programming Interviews Exposed
book covered or helped on probably 60-70% of questions I got. Well worth the
$20.
A) Linked Lists
This is an extremely popular topic. I've had linked lists on every interview.You must be able to produce simple clean linked list implementations quickly.
1. Implement Insert and Delete for
- singly-linked linked list
- sorted linked list
- circular linked list

int Insert(node** head, int data)int Delete(node**
head, int deleteMe)


2. Split a linked list given a pivot value
void Split(node* head, int pivot, node** lt, node** gt)

3. Find if a linked list has a cycle in it. Now do it without marking nodes.

4. Find the middle of a linked list. Now do it while only going through the list once. (same solution as finding cycles)

B) Strings
1. Reverse words in a string (words are separated by one or more spaces). Now do it in-place. By far the most popular string question!

2. Reverse a string

3. Strip whitespace from a string in-place
void StripWhitespace(char* szStr)

4. Remove duplicate chars from a string ("AAA BBB" -> "A B")
int RemoveDups(char* szStr)

5. Find the first non-repeating character in a string:("ABCA" -> B )
int FindFirstUnique(char* szStr)

C) More Advanced Topics:
You may be asked about using Unicode strings. What the interviewer is usually looking for is:
each character will be two bytes (so, for example, char lookup table you may have allocated needs to be expanded from 256 to 256 * 256 = 65536 elements)
- that you would need to use wide char types (wchar_t instead of char)
- that you would need to use wide string functions (like wprintf instead of printf)
Guarding against being passed invalid string pointers or non nul-terminated strings (using walking through a string and catching memory exceptions

D) Binary Trees
Implement the following functions for a binary tree:
- Insert
- PrintInOrder
- PrintPreOrder
- PrintPostOrder

Implement a non-recursive PrintInOrder

E) Arrays
1. You are given an array with integers between 1 and 1,000,000. One integer is in the array twice. How can you determine which one? Can you think of a way to do it using little extra memory.

2. You are given an array with integers between 1 and 1,000,000. One integer is missing. How can you determine which one? Can you think of a way to do it while iterating through the array only once. Is overflow a problem in the solution? Why not?

3. Returns the largest sum of contiguous integers in the arrayExample: if the input is (-10, 2, 3, -2, 0, 5, -15), the largest sum is 8
int GetLargestContiguousSum(int* anData, int len)

4. Implement Shuffle given an array containing a deck of cards and the number of cards. Now make it O(n).
Return the sum two largest integers in an array.
int SumTwoLargest(int* anData, int size)

5. Sum n largest integers in an array of integers where every integer is between 0 and 9int SumNLargest(int* anData, int size, int n)

F) Queues
Implement a Queue class in C++ (which data structure to use internally? why? how to notify of errors?)

G) Other

1. Count the number of set bits in a byte/int32 (7 different solutions)

2. Difference between heap and stack? Write a function to figure out if stack grows up or down.

3. SQL query to select some rows out of a table (only because I had SQL on the resume)

4. Open a file as securely as possible (assume the user is hostile -- list all the nasty things that could happen and checks you would have to do to)

5. Implement a function to return a ratio from a double (ie 0.25 -> 1/4). The function will also take a tolerance so if toleran ce is .01 then FindRatio(.24, .01) -> 1/4int FindRatio(double val, double tolerance,
int& numerator, int& denominator)

6. Write a program that tests whether a floating point number is zero. (Hint: You shouldn't generally use the equality operator == with floating point numbers, since floating point numbers by nature are hard to match exactly. Instead, test whether the number is close to zero.)

public class FloatTest {
public static void main(String[] args) {
float f = 100.0f;
float MAX = 0.001f;
float MIN = -MAX;
System.out.print(String.valueOf(f));
if ((f <> MIN)) {
System.out.println(" is pretty darn close to 0.");
} else {
System.out.println(" is not close to 0.");
}
}
}



F) Puzzles

1. You have 2 supposedly unbreakable light bulbs and a 100-floor building. Using fewest possible drops, determine how much of an impact this type of light bulb can withstand. (i.e. it can withstand a drop from 17th
floor, but breaks from the 18th).Note that the ever-popular binary search will give you a worst case of 50 drops. You should be able to do it with under 20.

2. There are n gas stations positioned along a circular road. Each has a limited supply of gas. You can only drive clockwise around the road. You start with zero gas. Knowing how much gas you need to get from each gas station to the next and how much gas you can get at each station, design an algorithm to find the gas station you need to start at to get all the way around the circle.

3. Out of 10 coins, one weighs less then the others. You have a scale. How can you determine which one weighs less in 3 weighs? Now how would you do it if you didn't know if the odd coin weighs less or more?

4. What is the next line in the following sequence:11121Answer: it's 1211 and the next is 111221

G) Design Questions

1. How would you design a server that has to process a fair number of good number of requests a second. What if you didn't know how many requests you'd be getting? What if requests had different priorities? (I always think of the
Apache design for this question)

2. Design malloc and free. (give up? see
how G++ malloc works or this page for more examples)

3. Design an elevator control system. Don't forget buttons on every floor and supporting multiple elevators. (What objects/methods/properties/how components communicate)

4. Design a chess game (what objects? what methods? which data where? how will it work?)

5. Design a deck of cards class (object/methods/data)

6. How would you design the infrastructure front half of a very large web ecommerce site? what if it was very personalized? (how sessions are handled? where and what you can cache? how to load-balance?)

H) Concurrency

1. Difference between Mutexes and Critical Sections?

2. What are Reentrant Locks? Implement a Reentrant Lock with Mutexes.

3. Implement a thread-safe class that will read/write to/from a buffer

TSBuffer::TSBuffer(int size)
int TSBuffer::Read(char* buff, int max_size)
int TSBuffer::Write(char* buff, int size)

I) Windows-specific Questions

1. What is the IUnknown COM interface?
2. Synchronization primitives available in Windows (see
MSDN documentation)
3. Basic structure of a Win32 program (WinMain, Message processing)

J) Networking

1. Difference between TCP and UDP? When would you want to use one over the other?
2. How would approach guaging performance of webpages/parts on a very large website?

K) Questions you are unlikely to get unless you claim a lot of IP experience

1. How does traceroute work?
2. How does path MTU discovery work?
3. How can one poison a BGP peer?

L) Non-Technical Questions

All of the following are very common. It's best to have canned answers.
1. What do you want to do?
2. Describe your perfect job?
3. How did your interview go? How did you like the group you interviewed with?
4. Rate your C++ proficiency on the scale of 1 to 10.
5. What have you been up to since you were laid off or finished school?
6. Why do you want to work at X?
7. What reservations do you have working at X?
8. Do you like working alone or in a group?
9. Discuss your greatest accomplishment over the last couple years.
10. Discuss one big problem you solved in a work/school project.
11. How do you handle conflict in a group?
12. How much do you want to make? How much did you make at your previous position?

M) Marketing Questions

Questions for Marketing candidates.

1. How would you market a [specific product this company makes] to a [specific population you are familiar with]? (Example: How would you market Word to college students?)
2. How would you expand a [business you are familar with]?

Links:
The best book for tech interviews, in my opinion - "Programming Interviews Exposed"
Joel On Software article about resumes - must read
Joel On Software techInterview section - more questions and answers
Seven Questions Employees Should Ask Before Joining a Startup

Programming Books:

The original and best C reference by the creators of C:

C Programming Language (2nd Edition) by Brian W. Kernighan
and
Dennis M. Ritchie


The original and best C++ reference by the creator of
C++:
The C++ Programming Language (Special 3rd Edition)
by

Bjarne Stroustrup
(creator of C++)