Pergunta de entrevista da empresa Daydream

2 straghtforward DSA problems: How to shuffle cards in a certain way. A candy problem.