← Samsung questions

Count H and T Shapes in Binary Matrix

Filed under Samsung

Given a binary matrix containing 0s and 1s, count the total number of distinct 'H' and 'T' shapes formed by adjacent 1s. An 'H' shape consists of two vertical stems of length 3 connected by a…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Samsung questions

Collected from public candidate posts and coding forums. Updated Nov 2026.