you give integer array deck there deck card card unique integer the integer ith card deckiyou order deck order want Initially card start face unrevealed deckyou follow step repeatedly card revealedtake card deck reveal deckif card deck card deck deckif unrevealed card step 1 otherwise stopreturn order deck reveal card increase ordernote entry answer consider deck example 1input deck 1713112357output 2133115177explanation we deck order 1713112357 order matter reorder itafter reorder deck start 2133115177 2 deckwe reveal 2 13 the deck 311517713we reveal 3 11 the deck 51771311we reveal 5 17 the deck 7131117we reveal 7 13 the deck 111713we reveal 11 17 the deck 1317we reveal 13 17 the deck 17we reveal 17since card reveal increase order answer correctexample 2input deck 11000output 11000 Constraints1 decklength 10001 decki 106All value deck unique