Google Interview Question

How to efficiently randomize a deck of cards. Detect cycle in directed graph.