Over a million developers have joined DZone.
Platinum Partner

Thursday Code Puzzler: Get The Size of X

· Performance Zone

The Performance Zone is presented by AppDynamics. Scalability and better performance are constant concerns for the developer and operations manager. Try AppDynamics' fully-featured performance tool for Java, .NET, PHP, & Node.js.

It's Thursday, so it's time for another code puzzler. The idea is simple: solve the coding problem as efficiently as you can, in any language or framework that you find suitable.

Note: Even though there really is nothing stopping you from finding a solution to this on the internet, try to keep honest, and come up with your own answer.  It's all about the participation!

Create 24

Given a matrix of 1s and 0s, find the largest possible X made from 1's. 

For example in the following matrix 
The size of X is 3, as the diagonal contains 3 1's.
The following would be invalid (i.e. 0) as there is no '1' at the center of an X shape

Catch up on all our previous puzzlers here

The Performance Zone is presented by AppDynamics. AppDynamics is a leader in the APM space with massive cost reductions for users.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}