Pika·Software Engineer·Technical Phone Screen
Jun 2026
Interviewed for a software engineer role at Pika, two algorithmic problems back to back. Both were on the trickier side, the kind where you think you have it and then realize you've missed something halfway through your explanation.
- Given an array of words and a max line width W, format the words into lines where each line (except the last) is exactly W characters wide with spaces distributed after the final word on that line. The last line is left-justified with single spaces. Return the formatted lines as strings and walk through your algorithm's time and space complexity.
- Given an integer array, compute the sum of products of all contiguous subarrays. In other words, for every pair of indices i <= j, multiply all elements from index i to j, then sum all those products together. Return the total.
“This is basically the LeetCode text justification problem but they added a small twist to the padding rule that tripped me up.”