Amazon Interview Question
Development Support EngineersYup .. ofcourse.. we are supposed to make a machine do this.
So, it should work for any kind of input.
Any pattern and any building blocks(each has 3 blocks in it
actually the pattern is not clearly visible in the qt above..
I am trying it again here
So your building blocks are
----
--
or
--
--
--
etc..
2 dashes (i.e. --) makes one block
and we are supposed to form a given pattern out of this..
like this..
like
----
----
--
--
Yup .. ofcourse.. we are supposed to make a machine do this.
So, it should work for any kind of input.
Any pattern and any building blocks(each has 3 blocks in it
actually the pattern is not clearly visible in the qt above..
I am trying it again here
So your building blocks are
----
--
or
--
--
--
etc..
2 dashes (i.e. --) makes one block
and we are supposed to form a given pattern out of this..
like this..
like
----
----
--
--
The example you gave is easy. Were there more challenging ones?
- Anonymous June 19, 2009