Skip to content

Commit

Permalink
Create explanation.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rndastech authored Dec 18, 2024
1 parent 551482f commit 5be6458
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Problem-setting/rndastech-1/explanation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
For calculating maxx, we can sort the given string x using a comparator function where the priority is given as F>E>D…>A>9>8>7…>1>0.
To find the minx, we can reverse maxx. If minx contains leading zeros, we can use a for loop to find the position of the first non zero number and swap it with the first position of minx.
To compare the hexadecimal numbers, we can convert them to integers and then compare them.
We need to check for “0” manually as it is the only number having leading zeros.

0 comments on commit 5be6458

Please sign in to comment.