Added initial methods for sorting in ArrayStack