Alicehasa hand ofcards,givenasanarrayofintegers.
Nowshewantstorearrangethecardsintogroupssothateachgroupissize W,andconsistsof W consecutivecards.
Return true ifandonlyifshecan.
Example1:
Input:hand=[1,2,3,6,2,3,4,7,8],W=