TCS
Company
"plz tell me a formula for finding squres in m*n grid"
Read Solution (Total 5)
-
- m*n+(m-1)(n-1)+(m-2)(n-2)+.......till any of(m-x)or(n-x) becomes 1
ex:- m=4 n=3
4*3+(4-1)(3-1)+(4-2)(3-2) =12+6+2=20 - 12 years agoHelpfull: Yes(10) No(1)
- (m+1)c2 * (n+1)c2
- 12 years agoHelpfull: Yes(3) No(12)
- FIRST find m>n or mn then
no of squres=1^2+2^2+3^2+....+n^2=(n(n+1)(2n+1))/6 - 12 years agoHelpfull: Yes(2) No(0)
- n+1C2=for square
- 12 years agoHelpfull: Yes(0) No(0)
- mC2*nC2;;;;;M FOR row nd n for column
- 12 years agoHelpfull: Yes(0) No(0)
TCS Other Question