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.
This solution sorts the ORIGINAL string array based upon each string's BigBecimal value. It does NOT convert back and forth from String to BigDecimal, which is where some posters went wrong. HERE is a good reference on sorting arrays using lambda expressions.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java BigDecimal
You are viewing a single comment's thread. Return to all comments →
This solution sorts the ORIGINAL string array based upon each string's BigBecimal value. It does NOT convert back and forth from String to BigDecimal, which is where some posters went wrong. HERE is a good reference on sorting arrays using lambda expressions.