Skip to Main Content
Programming Interviews Exposed, 4th Edition
book

Programming Interviews Exposed, 4th Edition

by John Mongan, Noah Suojanen Kindler, Eric Giguere
April 2018
Beginner content levelBeginner
384 pages
11h 3m
English
Wrox
Content preview from Programming Interviews Exposed, 4th Edition

17Graphical and Spatial Puzzles

Many brainteasers are graphical in nature or involve spatial thinking. All the techniques you’ve used on nongraphical puzzles are still applicable, but with these problems you have another very powerful technique available to you: diagrams.

DRAW IT FIRST

The importance of drawing diagrams cannot be overstated. Consider that although humans have been using written language and mathematics for only a few thousand years, we have been evolving to analyze visual problems for millions of years (for example, can that rhinoceros catch me before I get to that tree?). Humans are generally much better suited to solving problems presented in pictures than those presented in text or numbers. As the saying goes, “a picture is worth a thousand words.” This maxim also applies to technical interviews.

In some cases, the “actors” in these brainteasers are static, but more often they change or move. When this is the case, don’t draw just one picture, draw many pictures. Make a diagram for each moment in time for which you have information. You can often gain insight by observing how the situation changes between each of your diagrams.

Most graphical problems are two-dimensional. Even when a problem involves three-dimensional objects, the objects are often constrained to the same plane, enabling you to simplify the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beyond Vibe Coding

Beyond Vibe Coding

Addy Osmani
The Programmer's Brain

The Programmer's Brain

Felienne Hermans
Programming Rust, 2nd Edition

Programming Rust, 2nd Edition

Jim Blandy, Jason Orendorff, Leonora F. S. Tindall

Publisher Resources

ISBN: 9781119418474Purchase book