We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
As I've learned from Google, a simple method to solve this problem is to extract and store the digits of the given number in an integer array and sort this array in descending order. After sorting the array, print the elements of the array. Now I'm only on the first course at university as a future developer and if I have any issues with such assignments, I always refer to this resource.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Constructing a Number
You are viewing a single comment's thread. Return to all comments →
As I've learned from Google, a simple method to solve this problem is to extract and store the digits of the given number in an integer array and sort this array in descending order. After sorting the array, print the elements of the array. Now I'm only on the first course at university as a future developer and if I have any issues with such assignments, I always refer to this resource.