Monday, 27 August 2012

The Link

The sci - fi me was having a rather good time enjoying the discovery channel when I stumbled upon a curious looking and sounding program called "The Link" and hence my title. The show focuses on how seemingly unrelated discoveries or inventions are related and how one invention let to another and finally to the technological marvels that today we take for granted. The National Geographic talk about the show such:

"Technology is all around us. From computers to cameras, cell phones to sat navs – our dependence on technology has never been greater. But how many of us ever stop to question how these inventions actually came about? Challenging the commonly held view, that they appear fully formed, out of nowhere, The Link reveals the surprising origins of some of the most important technological breakthroughs, of the modern world."

graduates after convocationSo, why am I talking so much about a random show I happened to watch in National Geographic? The reason is simple. This is what is missing from today's educational system the worldwide. Lets take India's case for example, from the days we start learning we focus on passing exams and mugging up most things. It is a very selected few who go into inquiring about why it came to be. The fact is that education has reduced to more of studying and less of learning. How many of us, the educated mass as we call are able to explain why some certain things came to be and how they influence people, society and humanity at large. Take the case of fire or agriculture or the production line, do we know why it came to be, how it came to be or what it did to the society then? Isn't that what education was supposed to impart to us?

What I am trying to say is that at some time along the way we have lost sight of our goal and has gone astray. We don't need to overhaul our entire system, that's is not possible and even if its possible its not feasible. Our educators are good, our institutions are equipped enough. I don't mean at any point that all our schools are in surplus of facilities but I do believe that our schools have just enough infrastructure to create a thinking and capable tomorrow. What we really need is a change in the systems and its priorities. The priorities should move away from scoring marks and more on understanding concepts.

When one starts to speak about de-prioritizing marks people usually come to conclusions that exams are the villain and they should be taken to the guillotine. In fact that will only cost us dearly, exams should be there otherwise how will we evaluate our children, how will we ensure their progress? What we need are exams that evaluate children's understanding of a subject and their ability to correlate and infer. We need exams that will ensure understanding and model our syllabus and curricular to attain this aim. This does not involve a major over haul of anything but a few fundamentals of our educational system. 

teaching our children

Let our children be Einsteins and newtons, let them make and create and innovate tomorrow, let them know that they alone have the ability and the power in their hands to craft tomorrows dreams. Let them understand that their dreams are not simply dreams but visions for meeting tomorrows challenges head on, solve then and conquer them. When they understand this and cherish this revelation then only we will have completed our responsibility towards our children and completed our link to the next generation.

"Do watch "The Link" on National Geographic if you can its a great show to watch if you are a technological junkie or just a curious homo sapien!"

Wednesday, 22 August 2012

731 Days of Frivolous Love

Two lovers in embarce

It was not two years and one day ago that I met her. I knew her even before, In fact I might have even known her from another life. I have seen her even before that, not superfluously but even in the much simpler most straight forward sense. We were friends then and then we were better friends and now much more than just friends in the contemporary sense. But still we are friends first and anything and everything next.

Romeo and Juliet :  A paintingThe first time I met her was in my first days of college, in the most casual way, unnoticed and perturbing of each other’s existence. The first time I talked to her was in the gleaming presence of borosil glasses of the many million shapes and the vast variety of colourful liquids that it contained. Under its silent and tinted rendering of a magnificent evening was the first ever sounds greeted her in menial enquires. Then the first share the first touch, the first embrace and the first kiss and above all the first tear drop of love.

Two years back on that day lost among the wondrous celebrations how did I realized that it was to be her? That I don’t know but when our eyes met that day, then and there. I knew we were much more much more than what the earthy bodies have bounded us to be. We sue had history: a history that spanned eternities together. Her imperfections so perfectly sculpted that they fit like a hand in a glove to my imperfection. SO does my imperfections to hers. We complement and we complete and in unison we are eternal, transdential and complete.

Today all I price is her nearness all that I care for is the pungent fragrance of her aroma. Today everything is but another way to her just another step towards the ultimate union that is her and in her. Today everything is about her and about our love for one another. The one fact of the most greatest consequence today is that I am hers and she mine.  The one ultimatum is and is always is that

Lovers by the sunset


Tuesday, 14 August 2012

Its all about Love

Hasn't it always been about love? Wonder what I am taking about? I am taking about marriages. India is a confusing country for a marriage to exist, to one side we have lots of customs and the rich cultural vibrancy that at this epitome of ethnic diversity throws about and to the other we have the largely commercialized and institutionalized gala called a marriage. Somewhere along the way I start wondering what really is a marriage about? Is it about two people in love uniting or is it just something done because everybody else seems to be doing and is it just at the primeval end a means to keep ones clan running.

The one word that describes the ‘wedding’ industry could be magnanimous; the elusive and lucrative industry has stripped Indian marriages off its essentialities and replaced them with material substitutes that corrode an institution that has long been considered scared. The sanctity of the marriage has been long lost; it has been violated and prostituted. But what surprises me the most is how people could be so blinded that they could for go what is essential and indispensible in a marriage, Love.

History is the witness when it comes to marriages in India. History bears witness to the freedom of choice and the simplicity of the great Indian weddings. Brides were respected and bridegrooms stood proud without a price tag.  What now appear to have become a largely commercialized and hyped up cultural gala and festival with much diminished  importance for the actual wedding was not always so. The advent of arranged marriages are not so clear to me but must probably they came from a group of controlling fathers eager to extend their family lineage and false prestiges.

It passes my mind how arranged marriages could ever succeed, it is incomprehensible to me how two people completely unknown, unaware of each other even to the slightest character could ever co-exist as such. At least isn’t that not a gamble? A leap of faith? Of course they succeed what choice does they have?  We live in a society that taken over by its totalitarian dystopia dictates terms and conditions on our existence. They expect us to obey and follow the crowd like buffaloes and those that dare to stand apart are either classified as philosophers or mad men. Then again I believe, this lack of choice and subjection is the one and only reason as to why such a marriage should exist, Like my friend so daringly terms it, A compromise!

Don’t for one second believe that I disagree with the fact that occasionally there comes a couple that are just perfect or so near to that place. What we call a real match made in heaven. But isn’t that just and odd chance a, a play of probabilities? Love marriages or as I call it a real marriage exists and stems from love the sole reason that appeals to me when committing to such a demeaning soc ial institution. Why else should one marry if not for love after all marriage is all about love!

Monday, 6 August 2012

An Invisible Man

What true is that all men are invisible, invisible like glass, so invisible that they are seldom seen and the funny thing is that unlike glass they themselves feel invisible. Everyman is lonely, everyman is alone, how much ever he surrounds himself with people, he becomes more and more invisible. How can he be alone is an interesting question, especially in this fast shrinking world, but the sad truth is the smaller the world gets the lonelier its inhabitants get. It’s certainly a paradox upon itself that in the growing crowd people find themselves the more isolated.

We are connected with a million people through all sorts of media, wired, not wired, perceivable and unperceivable alike. Tiny electronic chips plug you to a vast network of friends and family, acquaintances and what not. The virtual world of thriving socialization sees even people lacking in inter personal skills in real life make magnanimous groups in the virtual domain. But have you ever thought what you are worth without the internet. Has it ever occurred to you to sever away all virtual ties for a few hours, try it and see whether you are truly not alone. The networks have a very bad feature about it; it fills you with a false sense of reality. You chat and chat with your colleague on line but in real life you can’t even tell “hello” though you see here every hour of every day of your life.

I am not here to bash technology and it’s just taking me far away from what is it that I really what to tell. The only reason I introduced the internet and the telecoms is because I wanted to tell you the virtual life is not the real life. The moment you are free from all these amenities you find yourself alone in the world. It’s certainly no generalization but the sad fact that rules most of our lives.

There are two kinds of loneliness in the world or I think so. One is the loneliness that persists because there is no one to be with you ever, because no one loves you are likes you. Now this is a sad state to be and the vast majority of us never fall in this category. The other the more general state of loneliness that you and I are so easily susceptible to is the state of loneliness that arise from the fact that though there exist a crowd of people who loves you they are just not there right now. This loneliness is always in the now. The moment you are alone it creeps in. Though you have a dozen friends, now seems to think about you then, no one calls no one enquires and then the minds starts playing sinister tricks on itself.

There is a goodness to this feeling of loneliness, it shows you what you want, what you can have and most importantly what is it that you already have. You would only miss what you already had, isn’t it? The truth is that no one is really invisible in this world, everyone is visible. It only happens that you are in a company of souls that can’t see you. I know I have half contradicted myself, but the truth is that no one is invisible, it’s just happens that no one is looking is looking right now. That is not the same as being invisible, Is it?

Sunday, 29 July 2012

The Amazon Interview Process

This is the crude stuff about how my interview at Amazon went, I did not want to bore my dear friends with it, but then I thought may be someone would find it useful. So this will be one among that few that's just there in my blog but not for my readers to read. This is for that tech crazy job aspiring people who would really find this useful as I found many such blogs useful for my preparations.

Amazon’s interview process is sure one of the toughest to crack, especially since they come with a very specific list of skills. Amazon’s interview process is intended to analyse one on the basis of a set of data points and the cumulative of all data points are taken to find the final result. It must also be noted that if one candidate fails to satisfy the company’s requirement even on one data point he or she will be eliminated instantly.

An Overview of Amazon's Interview process

Amazon looks for the following in any candidate

  • Programming skills
  • Problem solving skills
  • Knowledge of Data Structures and Algorithms
  • Problem identification skills

Amazon’s recruitment/placement process is divided mainly into two parts

  • The preliminary test
  • The technical interviews ( 3 – 4  interviews in the span of a day)

The preliminary test contains both technical and aptitude based questions and it also includes two programming questions that have to be coded in an environment provided by amazon. The primary aim of the programing questions are not to test your ability to produce outputs but the focus is on finding the better answer or the faster easier logic.

The interviews purely focuses on ones ability to solve problems and the depth of ones knowledge in the field of data structures and algorithms. The more important thing is that one should be able to code on paper as they will ask for complete working programs and they wont provide you a compiler to test it on. Further care should be taken when coding for the edge cases as all edge cases will be explicitly tested on your code by them.

The Aptitude / Technical Test

If ones dream of getting into Amazon must come true then it is mandatory that this round be cleared and clearing this is not very easy.

They ask around 20 wildly assorted questions spanning everything in computer science fundamentals and a few from aptitude section as well. One could always expect a few output questions from c and cpp. The only trick is to be through with the fundamentals. The list of questions and their topics I remember will be listed at the end.

Programming Questions

The more crucial part of the preliminary test is the coding section where you will be asked to code  two rather simple programs ( simple in reference to other programs that usually appear for coding contests or online coding tests) within a time span of 45 mins. Though Amazon as such does not explicitly specifies any restrictions with respect to the time and memory conception of the code, they do evaluate by hand the optimality and efficiency of the code to decide whom they should let in to the interviews.

Getting an output is not the primary criteria for getting a safe passage into the interviews. Do take extra care to make sure that a better solution is provided for each problem being asked. One more thing that should be kept in mind is that though the environment accepts your program if it provides the correct output for the provided test case it may not get you to the next round. Make it a point to construct your own test cases and test your code on that too. These should guarantee you a safe passage to the next round.

Again the question that I was asked and I remember will be provided at the end of the so called long prose.
PS: By the way don’t think about copying, they do use dif on  the codes.

The Interviews

I did have to go through a sum total of about 6 hours of interview process before I was selected and it was divided into 3 sessions. First a 45 minutes interview that tested me on problem solving, next was an another 1 and a half hour interview on Data structures and lastly a 3 hour 15 min interview on more advanced and tricky use of data structures, algorithms and problem solving.

The first interview included a warm welcome and two very straight forward questions, It only included a basic understanding of data structures and some very crucial logic to get past this one

The second one was a HR interview and a technical interview rolled into one. The HR questions asked were pretty basic and included questions like, what is your achievements and why amazon so on and so forth. The one thing to be sure about is that you should know your resume back and forth. They have asked me everything that was there on that piece of paper. Again all questions I remember will be appended to the document.

The third interview was the toughest one of all, it was a gruelling three hour process and some tough questions. There were two programming questions again one was really tough and the next was relatively easier which was then followed by lots of direct questions on data structures, more like rapid fire back to back questions round.

Every time they do ask if we have questions and its appreciated that one asks them questions and they do like being asked questions about the company and how work happens in Amazon.

Tips and Tricks

·      Learn to be able to deduce logic for solving a problem and then convert the logic into code. Do follow the distinction between the two. This helps achieve a generic approach to solving adhoc problems. I suggest using of flowcharts to deduce this logic as it helps convert complex logic to code very easily.( It aided me in coming out of the final interview in flying colours).

·       Try programming puzzles in sites like codechef and do participate in coding contests. This helps in developing an appetite  and aptitude for solving programing puzzles.

·         Do study data structures and algorithms very well, they are absolutely necessary for Amazon and do practise such that you be able to identify immediately what databases serves best when used to solve a particular problem.

The Questions



  1. Given a rectangle of given size what is the minimum no of squares needed to exactly cover the rectangle.
  2.  Identify a given algorithm.
  3. Given several pipelines their time costs and the delay in starting each pipeline what is the time taken to execute a certain no of instructions that are depended on each other.
  4. What is the maximum number of processors that can run using 11 resources such that deadlock will not occur.
  5. Which of the following happens ( deadlock and starvation), deduce for the given code.
  6. Several output questions.
  7. One question to identify the suitable characteristics of a network to be used under specified circumstances.
  8. A question for speed distance and time.

Sorry that’s all I can recall.

The two programming questions are

  1. Given that amazon wants to recruit only one from a group of n equally qualified candidates, they have decided to make them all stand in a row and them ask the ones standing at odd places to go home, repeatedly till one exists. Given n by standing at what position shall ensure a sure recruitment by Amazon.
  2. Given a linked list containing a sequence of characters, reorganise the string such that all the vowels appear first and the consonants next and they be sorted in the order they appeared.

Interview Round 1

  1. Given that amazon wants to recruit only one from a group of n equally qualified candidates, they have decided to make them all stand in a row and them ask the ones standing at odd places to go home, repeatedly till one exists. Given n by standing at what position shall ensure a sure recruitment by Amazon. Assume that the list given is  a linked list and all that you will have is the pointer to the start of the linked list.
  2. Print the elements in a n x m matrix diagonally and from bottom to top

Egs   for  a simple 3x3 matrix filled with number 1 - 9 print  7 , 4 8, 1 5 9, 2 6, 3                                                                                         

Interview Round 2

  1. Given a stack add the following feature without changing any of the characteristics of the stack. getminelement() with unit complexity, O(1).
  2. Everything in the resume round.
  3. What are my best achievements and why I consider it my best achievement?
  4. What are my weaknesses and when and how has it affected my productivity?
  5. What are my projects and explain in detail what I did?
  6. Explain how I managed my team and concentrated my teams effort to achieve our aim.

Interview Round 3

  1. Given that the input is a binary tree connect all the elements in the same level or depth using links.
  2. Given the stack what additional modification can you bring to the stack such that you are able to check the presence of an element in the stack.
  3.  Direct questions on Hashing( predominantly )and other data structures.

Additional Questions

  1. To swap adjacent elements of a linked list by modifying only the pointers. 1->2->3->4 becomes 2->1->4->3 and 1->2->3->4->5 becomes 2->1->4->3->5
  2. To sort the elements of a vector. Stable sort. The elements are sorted based on element%7. {1,2,3,4,5,6,7,14} becomes {7,14,1,2,3,4,5,6}
  3. To find number of sequences of the form 1...N such that each element differs from the previous by +1 or +2. N is the input. Bonus: Generate all possible sequences for given N.
  4. An array is given. Each element differs from the previous by +1 or -1. Best way to find the first occurrence of given number.
  5. Given an array of extremely huge size, find the sum of elements from ith index to jth index. There will be lots of queries even for a single array. So some sort of pre calculation is expected.