Skip to main content

Popular posts from this blog

MS interview

Algorithm Collection Q1: How would you find a cycle in a linked list? Try to do it in O(n) time. Try it using constant amount of memory. Q2: Given a history of URLs, how would you determine if a particular URL had been seen before? Q3: Since pages can have multiple URLs pointing to them, how can you make sure you've never seen the same CONTENT before? Q4: Come up with the plan on how to traverse a graph, as well as to quickly determine if a given URL is one of the million or so you've previously seen. Q5: The Web can be modeled as a directed graph. Come up with a graph traversal algorithm. Make the algorithm non-recursive and breadth-first. Q6: Write a function to print the Fibonacci numbers Q7: Write a function to print all of the permutations of a string. Q8: Design a memory management scheme. Q9: Give a one-line C expression to test whether a number is a power of 2. Now implement it without using loops. Q10: How can I swap two integers in a single l...

Amazon interview question Collection

General Questions and Comments [more] generic questions on software development -------------------------------------------------------------------------------- What is the complexity of this algorithm -------------------------------------------------------------------------------- What is your stronger language (Java or C#) -------------------------------------------------------------------------------- Lot of design questions and OOAD stuff 2 -------------------------------------------------------------------------------- Programming questions asked were more or less same as the ones listed at this site -------------------------------------------------------------------------------- more architectural view about solve problem capability. I think the intervier was more realistic than the other two . Not just because he recommend to 2nd interview, since I also have the experience with recuriting other employees in the past. I felt the potenial is more than anything in work. Coding is j...

Few Software Development Knowledge

 What are the benefits of OOD? o Object oriented design facilitates “Reusability”, “Extensibility” and “Modularity” of the software. We can divide the software into many components/classes so that “Abstraction” can be done on the changing part and non changing part to support the “changeability”. Plus Inheritance, Composition and polymorphism will always help in implementation.  Explain how the Garbage Collector works in C# o The GC of the C# (.Net rather) is a cool component in .NET framework. Being a C++ programmer, I truly understand the importance of it. I don’t need to worry about allocating /freeing the memory once I use it in .net. In c#, all the object memory management is done in “Managed heap. GC collects the unused memory based on metadata information which gives the memory layout of the created object. It performs the collection in two phases. Mark -> GC first finds the root of each object and traverse to the bottom of it adding each object and make a graph of it. It...