Ad
  • Default User Avatar

    I changed the description, trying to solve all the confusions and discrepancy and have wrote all this with some eye candy and have added some test cases also.
    I hope this will help while solving for others.
    Please see for any mistake (human here ;) ).

    And thnkx a ton for such a gud response and suggestion.