Abstract Confusions

Complexity is not a cause of confusion. It is a result of it.

Category Archives: Algorithm

Some Interesting Requirements / Questions

Over the time I received few interesting requirements and questions. Few of them are straight forward that you do it in minutes, and few other questions are strange enough that some time have to sit and etch out the solution which is not top of the head. It would be only fair to share the information here. I would give you the requirement / question, if you can answer them, please add in comments.

You can use any language you like (except 3rd requirement). I was forced to use PL/SQL because of the project requirements.

Read more of this post


Interesting Interview Question: Check if a String is Rotated

Found an interesting interview question at Stackoverflow.

How will you find a string ‘a’ is a rotated string of some string ‘b’ (say, or some other reference string, but known)?

a= ‘stackoverflow’, b = ‘overflowstack’, then ‘a’ is rotated string of ‘b’.

a= ‘stackoverflow’, b= ‘flowrevostack’, then ‘a’ is NOT rotated string of ‘b’.

What makes this interview question interesting is seemingly difficult question (check Jon Skeet’s answer, he admitted the actual answer is simple and elegant).

Read more of this post