From a deck of cards, a person selects two cards one at a time without replacement. Find the number of ways it can be done such that the first card is spade and second card is diamond or first card is heart and second card is club.
Number of ways spade can be selected = S = 13
Number of ways diamond can be selected = D = 13
Number of ways heart can be selected = H = 13
Number of ways club can be selected = C =13
Total number of ways possible =S×D+H×C=13×13+13×13=338