Clear Thoughts about Solutions



Three tools are available to analyze and solve complicated problems: figures, examples, and division.
 Candidates cannot solve complex problems without clear thinking. Sometimes interviewers ask very difficult questions that they do not even expect candidates to solve in less than an hour. What interviewers are interested in are the candidates' thinking processes in such situations, rather than complete and correct answers. Usually, interviewers dislike candidates who write code in haste, with lots of bugs in it.
There are a few methods to help candidates to formulate clear ideas. First, candidates can employ some examples to help themselves to analyze problems. Simulating operations with one or two examples may uncover the hidden rules. Second, figures are helpful to visualize abstract data structures and algorithms. Many problems related to lists and binary trees might become easier if they are visualized with figures. Another approach is to divide a complicated problem into multiple manageable pieces and then solve them one at a time. Many recursive solutions, such as divide-and-conquer algorithms, as well as dynamic programming algorithms, are all essentially utilization of division.
For example, it is quite a complex problem to convert a binary search tree into a sorted doubly linked list. When confronted with such a problem during interviews, candidates may draw some figures about one or two sample binary search trees and their corresponding sorted doubly linked lists in order to visualize the relationship between them. They can also try to divide a binary tree into three parts: the root node, the left subtree, and the right subtree. After the left and right subtrees are converted to linked lists, they are connected with the root node to form a sorted linked list, and the problem is solved. More details about this problem are available in the section Binary Search Trees and Double-Linked Lists.
www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

No comments:

 
Top Blogs