Available question text
Sum the squares i^2 for all i in [1..n] such that the decimal digits of i^2 can be partitioned into contiguous substrings whose integer values add up to i. This is solved by testing each i with a DFS/backtracking over digit partitions (n ≤ 1000, i^2 has at most a few digits so pruning suffices).
Related questions
Continue with questions that share topics or the same question type.
- Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Walk through Kadane's algorithm and explain the O(n) approach.
Coding
- Convert Binary Number in a Linked List to Integer
Coding
- Find a credit card provider based on the credit card number
Coding
- Find Closest Number to Zero
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2698. Find the Punishment Number of an Integer
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source