Month: June 2017

Sort numbers based on weight – Zoho

         Sort numbers based on weight – Zoho                                      Given a set of N numbers and the rules provided below to calculate their weights, the program must sort the numbers based on their weight and

Ways to repay Loan

                        Ways to repay Loan                                   A poor man borrows a sum of N rupees from his neighbour. The neighbour is kind enough not to impose any interest on

Interlace odd / even from A to B.

     Interlace odd / even from A to B.                                            Two numbers A and B are passed as input.A number N is also passed as the input.The program must print the odd numbers from

Filling Cans

                         Filling Cans                                 Two cans are with capacity X and Y liters.The program must determine the number of steps required to obtain exactly Z litres of liquid in one

MINIMUM LENGTH UNSORTED SUBARRAY

      MINIMUM LENGTH UNSORTED SUBARRAY                                                                                              Given an

Rotate Matrix 90 Degree Anti-Clockwise

Rotate Matrix 90 Degree Anti-Clockwise                                     A MxN matrix is passed as the input. The program must rotate the matrix by 90 degrees in anti-clock wise direction and print the rotated matrix as the output. Input Format: First line will

Chars To Remove For Same String Value

        Chars To Remove For Same String Value                                   N string values S1, S2, S3, SN are passed as input to the program. Values of S1, S2, S3, SN are such that if one character is removed

Reverse Pattern Printing – Numbers

                     Reverse Pattern Printing - Numbers                           Based on the input value of N, the program must print the pattern described below.Input Format: First line will contain the value of N.Output Format:N lines will contain the

Add Numbers – Base N

                                            Add Numbers - Base N                                            Two numbers X and Y are provided with reference