- 1

ARRANGEMENT OF BOOKS IN SHELFS

From a library, Raghu has picked 5 books from 5 different book self for exam preparation purpose. Accessing library is chargeable, so librarian Ritika has asked Raghu that, you have to pay any amount of Rs. 200. Then Raghu asked the librarian, how you calculated this amount, so she replied that, accessing cost for each book is Rs. 40. But, Raghu left his money bag to hostel, and replied that I have no money to pay. Then she informed him that, no need to pay, if you satisfy this condition. Condition is, “If you rearrange the books from its respective book self in increasing order, you can access these books freely.” Now help Raghu to design a function called Bubble Sort, which will help him to check, that, books are properly re-arranged in increasing order. Input Format First line of input has a int number n and second line has n integer seperated by space Constraints Numbers are distinct. All number are positive and less than 100 If constraints are not matched, then display “Wrong Pick, Choose again” wi

10th Oct 2018, 8:10 PM
Aakash
Aakash - avatar
1 Respuesta
+ 1
Where is your try?
10th Oct 2018, 8:20 PM
KrOW
KrOW - avatar