intersection of 5 arrays, implement stack, partition array of 1s and 2s, find first unique without hash