Implement a custom sorting algorithm to sort an array of integers without using any built-in SDK APIs such as .sort() or equivalent framework methods.