Tuesday, October 14, 2008

What Every C# .Net Developer Needs To Know (1)




I have been in so many interviews and was asked so many interesting questions that I have decided to collect those questions, I started this habit because I think every C# .Net Developer needs to know the answers to those questions, so whenever you have an interview or whenever you need to refresh your memory please stop by and answer these questions :).. I have answered all those questions previously however I will not include any answers to these questions nor will I mention companies’ names.

Warm-ups:


  1. What are the qualities of good code?

  2. How do you explain a complex technical term to a non-technical person? For example excel sheets?

  3. What's a recursive function?

  4. What is a bitwise operator?

  5. What was the first OOL?

  6. Is-a versus has-a relationships (with examples)

  7. Composition vs. aggregation relationships

  8. What is a Method Signature?

  9. What is strong-typing versus weak-typing? Which is preferred? Why?

General OOP Questions:



  1. What is an Object?

  2. What is a Class?

  3. Why OOP?

  4. What is a delegate?

  5. Overloading Vs Overriding with examples?

  6. What are the three most important features of OOP with examples?

  7. Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.

  8. Describe what an Interface is and how it’s different from a Class. Also Interface Vs Abstract Class?

  9. C# oop Vs. vb.net oop

  10. What is strong-typing versus weak-typing? Which is preferred? Why?

  11. Linked list, Hash table, Stack, Queue, Binary tree, Binary search tree: Explain?

  12. What's the difference between a linked list and an array?

  13. How would you describe encapsulation?

Algorithims:



  1. Write a function to find the middle node of a single link list

  2. What is the Big O notation?

  3. What is the best and worst performance time for a hash tree and binary search tree?

  4. What is the best and worst time for the operation 'equals' (Strings)

  5. Order the functions in order of their asymptotic performance
    * 2^n, * n^Googol ( 10^100), * n!, * n^n

  6. Implement an algorithm to sort a linked list. Why did you pick the method you did? Now do it in O(n) time.

  7. Write a code to delete any node in a link list. With all test cases and boundary conditionsThe Traditional Method

  8. Write a function to reverse a string

  9. Write function to compute Nth fibonacci number

  10. Print out the grade-school multiplication table up to 12x12

  11. Write a function that sums up integers from a text file, one int per line

  12. Write function to print the odd numbers from 1 to 99

  13. Find the largest int value in an int array

  14. Format an RGB value (three 1-byte numbers) as a 6-digit hexadecimal string

  15. Write a function that inserts an integer into a linked list in ascending order.

  16. Implement a linked list. Why did you pick the method you did?

  17. Describe advantages and disadvantages of the various stock sorting algorithms.

  18. Implement an algorithm to reverse a linked list. Now do it without recursion.

  19. Implement an algorithm to insert a node into a circular linked list without traversing it.

  20. Implement an algorithm to sort an array. Why did you pick the method you did?

  21. Write routines to read and write a bounded buffer.

  22. Write routines to manage a heap using an existing array.

  23. How would you find a cycle in a linked list?

  24. Describe the algorithm for a depth-first graph traversal

  25. How would you find the nth to last element in a linked list?

  26. Given two binary trees, find whether or not they are similar.

  27. You have a tree (not Binary) and you want to print the values of all the nodes in this tree level by level.

  28. Reverse a linked list iteratively, do it first with single pointers and then do it again with double pointers. Now do it again recursively but not tail-recursive, and then do it again tail-recursively. What do you do if it has a loop?

  29. How would you write qsort?

  30. Describe Sorting algorithms and their complexity - Quick sort, Insertion Sort, Merge Sort, Heap Sort, Bubble Sort, and Selection Sort
    If you had a million integers how would you sort them and how much memeory would that consume?

  31. Tree search algorithms. Write BFS and DFS code, explain run time and space requirements. Modify the code to handle trees with weighted edges and loops with BFS and DFS, make the code print out path to goal state.

  32. Remove the Duplicates from an Array.

  33. Reverse a string preserving the words in the string
    Eg.Input = “Heros Happen Here”.Output = “Here Happen Heros”.

  34. Find the deepest level in a tree and return its depth. Hints and assumptions: its a binary tree.

  35. An array of n number of elements for example from 0 --> n write a function that returns true if each element from 1-->n exists in the array once.
    eg: {3,4,2,1} returns true{3,2,3,2} return false;

  36. Implement a Queue Using 2 Stacks in order of Constant time..
    Hint: you only need to implement the Enqueue and the DeQueue functionsAssumtion a stack class already exists the stack class has push, pop and isEmpty methods and i will use them here

5 comments:

Anonymous said...

sarah-arram-technical.blogspot.com is very informative. The article is very professionally written. I enjoy reading sarah-arram-technical.blogspot.com every day.
quick loan
faxless payday loans

Anonymous said...

I am the sort of hombre who passions to seek hot things. Right now I am fabricating my private pv panels. I am making it all by myself without the assistance of my men. I'm utilizing the net as the only path to acheive this. I came across a truly amazing website that explains how to build pv panels and wind generators. The site explains all the steps needed for photovoltaic panel construction.

I'm not exactly sure bout how correct the info given there is. If some people over here who have xp with these things can have a see and give your feedback in the site it would be awesome and I would extremely appreciate it, cauze I really like [URL=http://solar-panel-construction.com]solar panel construction[/URL].

Tnx for reading this. U people are great.

Anonymous said...

hello ive just joined[url=http://mundoboricua.com/index.php/public/user/name_Jimmi1041/].[/url]

Anonymous said...

While i was scouting around at this web page and have found it to be really helpful. I would greatly appreciate all assistance.

Recently, Louisville has came about as a major gathering place for the health care and health-related sciences market sectors. Louisville has been fundamental to advancements in heart and hand surgical procedure as well as cancer healing. A few of the very first unnatural coronary heart transplants were carried out in Louisville. Louisville's flourishing downtown medical research university includes the brand-new $88 million rehab community, and a wellbeing sciences exploration and commercialization park that, in collaboration with the University of Louisville, has lured nearly 75 best experts and scientists. Louisville might be also home to Humana, one particular of the nation's most significant health insurance policy organizations.

Louisville is home to several major corporations and corporations.

Anonymous said...

like gambling? friendship las vegas? convey the all reborn [url=http://www.casinolasvegass.com]casino[/url] las vegas at www.casinolasvegass.com with all upon 75 up to while unbolted [url=http://www.casinolasvegass.com]online casino[/url] games like slots, roulette, baccarat, craps and more and filch singular spoilt licit modification with our $400 unconstrained bonus.
we be godlike but safer games then the crumbling online [url=http://www.place-a-bet.net/]casino[/url] www.place-a-bet.net! few more free casino games and free [url=http://www.2010-world-cup.info]casino bonus[/url] you can find at the 2 new [url=http://www.buy-cheap-computers.info]casino[/url] guides : www.2010-world-cup.info and www.buy-cheap-computers.info .