HomeAway

  www.homeaway.com
Work in HR? Unlock Free Profile

HomeAway Software Engineer Interview Question

I interviewed in Austin, TX and was asked:
"Design a card, a deck of card in OOP and write shuffle method assuming you have a random function. Write the code"
Add Tags [?]
Answer

Part of a Software Engineer Interview Review - one of 36 HomeAway Interview Reviews

Answers & Comments

0
of 0
votes

Shuffle method is tricky if you don't know the answer. Randomly select a card from 0 to i with i initialized to 51, swap that card with the the card at i-th index. Decrement i and continue until i == 0

- Interview Candidate on Nov 16, 2010

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.