Remark

|Dn| = 2n and |Q| = 8. Thus, the only two groups which might be isomorphic to each other are D4 and Q.

But they are not: D4 has only two elements of order 4, viz., c and c3, whereas Q has 6 elements of order 4, viz., all but 1 and -1.