If the letters of the word $GARDEN$ are permuted in all possible ways and the strings thus formed are arranged in the dictionary order, then find the ranks of the words 
- $\; GARDEN$
- $\; DANGER$
The given word is $GARDEN$. 
The dictionary order of the letters of given word is $\; A, \; D, \; E, \; G, \; N, \; R$ 
-  In the dictionary order, words which begin with $A$ come first. 
 If the first place is filled with $A$, the remaining 5 letters $\; D, \; E, \; G, \; N, \; R \;$ can be arranged in $5!$ ways.
 Proceeding in this manner we have,
 $A \; - \; - \; - \; - \; - \; = 5!$ ways
 $D \; - \; - \; - \; - \; - \; = 5!$ ways
 $E \; - \; - \; - \; - \; - \; = 5!$ ways
 $G \; A \; D \; - \; - \; - \; = 3!$ ways
 $G \; A \; E \; - \; - \; - \; = 3!$ ways
 $G \; A \; N \; - \; - \; - \; = 3!$ ways
 $G \; A \; R \; D \; E \; N \; = 1$ way
 $\therefore \;$ Rank of the word $GARDEN$ is $= 3 \times 5! + 3 \times 3! + 1 = 3 \times 120 + 3 \times 6 + 1 = 379$
-  Rank of the word $DANGER$ 
 $A \; - \; - \; - \; - \; - \; = 5!$ ways
 $D \; A \; E \; - \; - \; - \; = 3!$ ways
 $D \; A \; G \; - \; - \; - \; = 3!$ ways
 $D \; A \; N \; E \; - \; - \; = 2!$ ways
 $D \; A \; N \; G \; E \; R \; = 1$ way
 $\therefore \;$ Rank of the word $DANGER$ is $= 5! + 2 \times 3! + 2! + 1 = 120 + 12 + 2 + 1 = 135$