Square logo

Square Interview Questions

9 practice questions for Square technical interviews

coding Medium Verified

Connect Four


Category: Grid/matrix coding problem
# Question Design a ConnectFour class that implements the Connect Four board game. The board is a 6-row by 7-column grid. Two players take turns...
Input: 2D grid
Output: Printed output
coding Medium Verified

Page Navigator


Category: Sliding window coding problem
# Question Design a PageNavigator class that simulates a paginated view with a sliding window. Given a total number of pages and a window size, the...
Input: List
Output: Computed result
coding Medium Verified

Grid Exits


Category: Grid/matrix coding problem
# Question You are given a 2D grid containing open cells (".") and walls ("#"). An exit is any open cell on the border of the grid that is...
Input: 2D grid
Output: Integer
coding Medium Verified

Item Price Manager


Category: Algorithm coding problem
# Question Design an ItemPriceManager class that tracks the price history of an item over time and supports querying the price at any date and the...
Input: Given input
Output: Computed result
coding Easy Verified

Pig Latin Translator


Category: Algorithm coding problem
# Question Translate a sentence into Pig Latin using the following rules: Rules: 1. If a word begins with a vowel (a, e, i, o, u),...
Input: Given input
Output: Computed result
coding Medium Verified

Frequency Merge Tree


Category: Tree coding problem
# Question Given a string, build a Frequency Merge Tree as follows: 1. Count the frequency of each character in the string. 2. Create a leaf node...
Input: String
Output: Computed result
coding Easy Verified

Obstacle Grid Blocks


Category: Grid/matrix coding problem
# Question You are given two integers R and C representing the number of rows and columns in a grid (0-indexed). You are also given a list...
Input: 2D grid
Output: Computed result
coding Medium Verified

Soccer Tournament Tracker


Category: String coding problem
# Question
Input: Array of strings
Output: Array
coding Easy Verified

Candy Bag Matcher


Category: String coding problem
# Question
Input: Array of strings
Output: Array

No AI generated questions yet for Square.

Start practicing Square questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free