FastPrepCentered Block Placement Queries
Problems/Centered Block Placement Queries

Centered Block Placement Queries

Susquehanna International Group (SIG) logoSusquehanna International Group (SIG)● MediumNEW GRADOA

Updated Dec 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Susquehanna new grad software engineer online assessment. The candidate said it was the same question as this one: add obstacles to an infinite number line and check whether a block centered on a point fits.

The report does not give the method name, the input format or the limits. Here, you get the queries as a list of integer arrays and return one string of 0s and 1s.

Our version is about 95% the same as the reported question.

Special thanks: 🌷 A special thank you to a lovely, amazing fren for sharing that this question appeared in an interview on December 1, 2026! ( ˶ˆᗜˆ˵ ) 🩷

Given a list of queries on an infinite number line of integer coordinates that starts with no obstacles, process the queries in order and return a binary string with one character for each check query.

  • [1, x] places an obstacle at coordinate x. Coordinate x is guaranteed to be empty.
  • [2, x, size] checks a block centered at x. The block covers every integer coordinate from x - size + 1 to x + size - 1, inclusive. Append '1' if none of those coordinates has an obstacle, and '0' otherwise. A check does not place the block.

Function

processBlockQueries(queries: int[][]) → String

Examples

Example 1

queries = [[2,0,3],[1,2],[2,0,3],[2,-3,2]]return = "101"

The first check covers -2 through 2, which is empty, so it gives '1'. After an obstacle is placed at 2, the same check gives '0'. The last check covers -4 through -2, which is empty, so it gives '1'.

Example 2

queries = [[1,5],[2,5,1],[2,4,1],[2,3,3]]return = "010"

A block of size 1 covers only its center. The check at 5 hits the obstacle, and the check at 4 is empty. The last check covers 1 through 5, and its right end is the obstacle at 5.

Example 3

queries = [[1,-1000000000],[2,999999999,1000000000],[2,0,1000000000],[2,-1,1000000000]]return = "110"

The first check covers 0 through 1999999998. The second covers -999999999 through 999999999, which stops one short of the obstacle. The third covers -1000000000 through 999999998 and includes the obstacle.

Constraints

  • 1 <= queries.length <= 10^5
  • Each insertion query has 2 integers and each check query has 3 integers.
  • -10^9 <= x <= 10^9
  • 1 <= size <= 10^9
  • Inserted obstacle coordinates are distinct.

More Susquehanna International Group (SIG) Online Assessment questions

  • Catch Fish with Reusable BaitsOA · Seen Nov 2026
  • Bold Play to Reach a GoalOA · Seen Nov 2026
  • Cats, Truth and Who Has MoreOA · Seen Nov 2026
  • Counting Cows by Their LegsOA · Seen Nov 2026
  • Enough Muffins for the LineOA · Seen Nov 2026
  • Expected Consecutive Pairs Among Chosen NumbersOA · Seen Nov 2026
  • Four-by-Four Boundary GridOA · Seen Nov 2026
  • Frog Paths Without Long RunsOA · Seen Nov 2026
  • Higher Roll, or Lose the SumOA · Seen Nov 2026
  • Is a Popular Story Fake?OA · Seen Nov 2026

Similar questions at other companies

  • Rolling MetricsAkuna Capital · OAAkuna Capital interview questions
  • Centered Block Placement QueriesRoblox · OARoblox interview questions
  • Maximum Profit from an Increasing Price TripletOdoo · OAOdoo interview questions
  • Longest Subarray with Sum at Most KGoogle · OAGoogle interview questions
  • Maximum Laptop Rating in a Price RangePostman · OAPostman interview questions
  • Employee Ratings Management SystemAmazon · PHONE SCREEN
  • Running Medians and PercentilesStackAdapt · PHONE SCREENStackAdapt interview questions
  • Range ModuleWalmart · PHONE SCREENWalmart interview questions
  • Order Sequence Prefix Counts and QuantitiesHeadlands Technologies · PHONE SCREENHeadlands Technologies interview questions
  • Count Later Lower ReadingsRippling · ONSITE INTERVIEWRippling interview questions

Susquehanna International Group (SIG) interview experiences

  • SIG Quant Researcher Experienced Hire Interviews: 11 Experiences
  • SIG Quant Research Intern Interviews: 60 Experiences
  • SIG Quant Researcher New Grad Interviews: 49 Experiences
  • SIG Quant Researcher Intern Interviews: 1 Experience
  • SIG Quant Second-Round Tech Screen: 1 Experience
All Susquehanna International Group (SIG) interview questionsSee Susquehanna International Group (SIG) hiring insights
Saved
class Solution {
    public String processBlockQueries(int[][] queries) {
        // Write your code here.
    }
}
Checking account…