Skip to content

Instantly share code, notes, and snippets.

View otunbaCrafts's full-sized avatar

Ayodele otunbaCrafts

View GitHub Profile
@otunbaCrafts
otunbaCrafts / ShuffleClass.java
Last active May 17, 2021 08:26
Some help for Apex College. A logic implemented in Java to shuffle pupils on an assembly line by moving a number of pupils either to the front of the line or to the end of the line.
public class ShuffleClass {
public static int[] shufflePupils(int[] pupils, int numberToMove)
{
if(pupils == null) {
throw new IllegalArgumentException("List of pupils is null");
}
if(Math.abs(numberToMove) > pupils.length) {