1p3a Experience · Sep 2025

Capitalone Online Test Analysis for Software Development Engineer (SDE) Role

SWE OA Easy
4 replies

Interview Experience

  1. The first question is a simple string counting problem. The string type is "From To Count". It counts how many times "From" and "To" appear [unrelated to the count]. If "from" and "to" are the same

Full Details

  1. The first question is a simple string counting problem. The string type is "From To Count". It counts how many times "From" and "To" appear [unrelated to the count]. If "from" and "to" are the same, record it once. Then return the two largest occurrences. Splitting the string --> Counting --> Saving to a List --> Sort and returning the top two. 2. Given an integer array nums and an integer maxChange, we can modify at most maxChange elements to any integer. Requirements: Primary objective: If, within the maximum number of modifications to maxChange, all consecutive substrings (i.e., consecutive subsequences) in the modified array have a GCD (Greatest Common Divisor) of 1,

return
1. Secondary objective: If the primary objective (i.e., at least one consecutive substring has a GCD > 1) cannot be satisfied, then we need to modify at most maxChange elements to minimize the length of all consecutive substrings with GCD > 1. Finally,

return the maximum length of these consecutive substrings with GCD ≥ 2.

Example Analysis Example 1: nums = [1, 2, 8, 4, 6, 5], maxChange = 1 The longest consecutive substring with GCD > 1 is [2, 8, 4, 6] (GCD = 2). We can change 8 to 1, resulting in [2, 1, 4, 6]. In this case, the consecutive substring with GCD > 1 is [4, 6] (GCD = 2), with a length of 2. Alternatively, we can change 4 to 1, resulting in [2, 8, 1, 6]. In this case, the consecutive substring with GCD > 1 is [2, 8] (GCD = 2), with a length of 2. Therefore, the result is 2.

Example 2: nums = [1, 2, 8, 4, 6, 10, 5], maxChange = 2 The longest consecutive substrings with GCD > 1 are [2, 8, 4, 6, 10] (GCD = 2) and [10, 5] (GCD = 5). We can change 8 and 6 to 1, resulting in [2, 1, 4, 1, 10] and [10, 5]. In this case, the consecutive substring with GCD > 1 is [10, 5], with a length of 2. Alternatively, we can change 8 and 10 to 1, resulting in [2, 1, 4, 6, 1] and [1, 5]. In this case, the consecutive substring with GCD > 1 is [4, 6], with a length of 2. You can also change 4 and 10 to 1, resulting in [2, 8, 1, 6, 1] and [1, 5]. In this case, the continuous substring with GCD > 1 is [2, 8], with a length of 2. Therefore, the result is 2. I didn't understand the problem at all; it took me almost 40 minutes to figure it out. I failed the OA. I wrote it down today, and the general idea is: Find a continuous list of [one-dimensional dp, O(n)] strings with GCD > 1 --> Use binary search based on the maxChange constraint to see how long the final continuous substring is. The code isn't difficult to write, but the logic is a bit convoluted. *Requesting points for reading this post**

About This Question

This is a candidate experience report from a capitalone interview for a swe role during the oa round reported in 2025.

It covers the following topics: Array, Strings, Dynamic Programming, Binary Search, Dynamic Programming, Sorting, Arrays, Binary Search .

Difficulty rating: Easy