Category Archives: algorithms

Sorting Java Array in 1 Loop (Psuedo Sorting) AP Java Prep

So  ..our student , Jeff was trying to write an method that sorts an array of ints  , called [crayon-59ea1eb23afa2832346107-i/] , using a single loop. He wrote the code below:. Download code So, was Jeff succesful? When this code is run, will the method return a sorted array. In this case that would be [crayon-59ea1eb23afad787477590-i/]   ?     And the … Continue reading Sorting Java Array in 1 Loop (Psuedo Sorting) AP Java Prep →

5 Gifs to Understand Binary Search Trees

Gif #1 Gif #2 : Binary Search Tree from Sorted Array  Gif #3 How insertion into a binary search tree (BST) works     Gif #4 : Degeneration of Binary Search Tree Demonstration   Gif #5 is coming …