 ;; with this HEAP-SORT becomes a pie @implementation
 ;;;;;;;;
 (set! *warn-on-reflection* true)
-(def nums (shuffle (range 0 10000)))
+(def nums (shuffle (range 0 100000)))
 nums
 
 (time

              (.add sorted min)
              (recur)))))
  sorted
))) ;; for 10.000 nums:: "Elapsed time: 91,800.966877 msecs"

;; my merge-sort from previous implementation-studies computed
;; shuffled 100K nums in:: "Elapsed time: 1785.201451 msecs"

;; i've used ArrayList in my heap-insert/heap-extract implementations relying on
;; dynamic shrinking the array-list while removing items from it, however behind
;; the scenes, the entire array is copied with System.arraycopy...which is NOT
;; performant-wise at all...

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; OWN ideas...on how to improve the running time ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; To optimize the heapify operation, i should discard ALL the ((2^height - 1) level) items
;; bubbling-up, because those are leaves and shouldn't be heap-ordered!

;; Therefore:: based on the (alength) of the array, i should find the 
;; correspondent:: 2^x factor. i'm interested in finding the "x" here...
;; where the x stands for the height/level => if i know the height => 
;; i know which items should be discarded based on the total items.

;; Applying a rudimental math here, i'm interested in finding the (log2 x) 
;; by applying the formula:: (log10 x) / (log10 2) => (log2 x) gives the log base 2
(/ (Math/log10 8) (Math/log10 2)) ;; => (log2 x) -> where x = 3 => x = pow of 2:: 2^3
(/ (Math/log10 11) (Math/log10 2)) ;; => (log2 x) -> where x = 3.4594316186372978 = pow of 2:: 2^3
;; => so flooring the number and i got the height
;; If the items in an array size is: 11 -> then i can apply the math formula,
;; and get the height, then applying the power of 2 using that computed height
;; i know the range of the items that SHOULD BE included in the heap operation.

(defn heapify-opt [xs]
  "heapify takes a vector and transforms it into a heapified data-structure
   the operations performs in O(nlogn) just like any sorting operation
   Note:: there's no better sorting operation that performs faster than
