dynamic_cast in C++
June 11, 2012
Check if a Binary tree is sub-tree of another
June 11, 2012

Invert traingle made from 6 circles

Given 6 circles which are arranged in the form of a triangle as shown below

  °
 ° °
° ° °

You are supposed to invert the triangle and want to move minimum circles. At least how many circles do you need to move to invert the above triangle as below

° ° °
 ° °
  °

Solution:

You can invert the triangle by moving just 2 circles, as shown below:

Leave a Reply

Your email address will not be published. Required fields are marked *