Can i do this problem without array list

can i do sub-sequences problem without array list or not is it possible