The problem of flat output characterization for switched linear discrete-time systems is addressed. First, an algebraic condition for an output to be flat is provided. It applies for I-flat outputs with the integer I potentially strictly greater than 1. Next, it is proved that such a characterization is decidable. Finally, an efficient algorithm which allows to decide in polynomial time whether a given output is flat is given. The algorithm is built from the observation that the flat output characterization can be expressed in terms of dead-beat stability of an associated constrained switched system. Thus, the notions of joint spectral radius and graph theory play relevant roles in this context.