Square Interview Questions (11)
Practice real interview problems from Square
| Status | Title | Solution | Practice | Difficulty | Companies | Topics |
|---|---|---|---|---|---|---|
| 139. Word Break | Solution | Solve | Medium | Amazon+31 | ||
| 271. Encode and Decode Strings | Solution | Solve | Medium | Amazon+10 | ||
| 300. Longest Increasing Subsequence | Solution | Solve | Medium | Accenture+29 | ||
| 573. Squirrel Simulation | Solution | Solve | Medium | Square | ||
| 699. Falling Squares | Solution | Solve | Hard | Square+1 | ||
| 969. Pancake Sorting | Solution | Solve | Medium | Amazon+2 | ||
| 999. Available Captures for Rook | Solution | Solve | Easy | Google+1 | ||
| 1814. Count Nice Pairs in an Array | Solution | Solve | Medium | Capital One+5 | ||
| 1861. Rotating the Box | Solution | Solve | Medium | Amazon+9 | ||
| 2069. Walking Robot Simulation II | Solution | Solve | Medium | Google+1 | ||
| 2768. Number of Black Blocks | Solution | Solve | Medium | Capital One+8 |
About Square Coding Interviews
Preparing for Square interview questions requires more than just solving random LeetCode problems. Square (now part of Block) looks for engineers who can write clean, production-ready code and design scalable systems used by millions of merchants and payment users worldwide. Their engineering culture emphasizes strong fundamentals, thoughtful problem solving, and the ability to communicate clearly while coding.
The typical Square coding interview begins with a technical phone screen where candidates solve one or two data structures and algorithms problems. Candidates who pass move on to onsite or virtual onsite rounds that usually include multiple coding interviews, a system design discussion (for experienced roles), and a behavioral round focused on collaboration and ownership.
From real interview reports, Square tends to focus on practical algorithmic problems rather than obscure puzzles. Common patterns include:
- Hash maps and frequency counting
- Array and string manipulation
- Tree and graph traversal
- Two-pointer and sliding window techniques
- Medium-level dynamic programming
Most questions fall in the easy-to-medium range, but interviewers often push candidates to improve solutions, analyze complexity, and discuss trade-offs. Clean code and clear reasoning matter as much as the final answer.
On this page, you'll find 12 real Square coding interview problems curated from past interview experiences. Each problem includes explanations and solutions in multiple languages so you can practice the exact patterns Square engineers expect. If you're preparing for a Square software engineer role, working through these questions is one of the fastest ways to build confidence before the interview.
Interview Tips for Square
Understanding the Square interview process can significantly improve your chances of success. While the exact structure varies by role and level, most candidates go through a structured series of technical and behavioral interviews focused on real-world engineering skills.
A typical Square software engineering interview includes:
- Recruiter screen: 20–30 minute call discussing your background and the role.
- Technical phone screen: One coding problem solved in a shared editor, focusing on data structures and clean implementation.
- Virtual onsite (3–5 rounds): Multiple coding interviews, a system design round for mid/senior roles, and a behavioral interview.
Square interviewers emphasize readable code and thoughtful discussion. They often ask candidates to explain their approach before coding and may request improvements or optimizations after the initial solution.
The most common DSA topics in Square coding interviews include:
- Arrays and strings (parsing, transformations, substring problems)
- Hash tables and counting problems
- Binary trees and BFS/DFS traversal
- Intervals and scheduling problems
- Two pointers and sliding window techniques
Unlike some companies that heavily emphasize advanced algorithms, Square frequently uses problems that simulate practical backend tasks such as log processing, transaction grouping, or data aggregation.
Preparation strategy:
- Start with easy-to-medium array and hashmap problems.
- Practice explaining your thought process out loud while coding.
- Focus on writing clean, modular code with clear variable names.
- Review time and space complexity after every solution.
Common mistakes to avoid:
- Jumping into code without explaining the approach.
- Ignoring edge cases such as empty inputs or duplicates.
- Writing overly complex solutions when simpler ones exist.
Most candidates prepare for 4–6 weeks by solving 60–120 targeted problems. Working through curated Square-style questions—like the 12 problems on this page—helps you quickly recognize the patterns that appear in real interviews.