Skip to main content
deleted 49 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

Japt -h, 1110 bytes

ñÈu2pHÉñÈu2pH)¤¬x

Try itTry it

ñÈu2pHÉñÈu2pH)¤¬x     :Implicit input of array
ñ               :Sort by
 È              :Passing each element through the following function
  u             :Positive modulo
   2p           :  2 raised to the power of
     H          :    32
      É         :    Minus 1
       )        :End modulo
        ¤       :To binary string
         ¬      :Split
          x     :Reduce by addition
                :Implicit output of last element

Japt -h, 11 bytes

ñÈu2pHÉ)¤¬x

Try it

ñÈu2pHÉ)¤¬x     :Implicit input of array
ñ               :Sort by
 È              :Passing each element through the following function
  u             :Positive modulo
   2p           :  2 raised to the power of
     H          :    32
      É         :    Minus 1
       )        :End modulo
        ¤       :To binary string
         ¬      :Split
          x     :Reduce by addition
                :Implicit output of last element

Japt -h, 10 bytes

ñÈu2pH)¤¬x

Try it

ñÈu2pH)¤¬x     :Implicit input of array
ñ              :Sort by
 È             :Passing each element through the following function
  u            :Positive modulo
   2p          :  2 raised to the power of
     H         :  32
      )        :End modulo
       ¤       :To binary string
        ¬      :Split
         x     :Reduce by addition
               :Implicit output of last element
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

Japt -h, 11 bytes

ñÈu2pHÉ)¤¬x

Try it

ñÈu2pHÉ)¤¬x     :Implicit input of array
ñ               :Sort by
 È              :Passing each element through the following function
  u             :Positive modulo
   2p           :  2 raised to the power of
     H          :    32
      É         :    Minus 1
       )        :End modulo
        ¤       :To binary string
         ¬      :Split
          x     :Reduce by addition
                :Implicit output of last element