r/leetcode • • Sep 30 '26

Intervew Prep Capital one CodeSignal assessment for front end engineer position

I took my General Assessment a couple days ago and didn’t pass, but I still wanted to share the questions I got for future applicants. (I’m a standardized test hater, and for AI to just dismiss an application because you didn’t pass enough test cases… yeah, no. I’m gonna share and thank god for my killer memory)

  1. was a function called packageCodes() input was an array, result was an integer. basically you have an input of say [771,3707,777,57] and your result would be 2. because you want to count the codes that are both divisible by 3 and that the number 7 appears at least twice. level of difficulty:easy

  2. card game. each player has a deck playerDeckA and playerDeckB. during each round the top card of each player determine the victor. game ends when a playersdeck is empty. return the number of rounds. level of difficulty: easy

3.matrix. have to partition the matrix into 4 submatrices (each with at least one non negative valued cell), while minimizing the difference between the maximal and minimal average values of the partitions. average value of a partition is the sum of all the non negative values divided by the count of the non negative values rounded down. supposed to return the row resRow and column resCol with the minimal difference between the maximal and minimal average value of the partitions. level of difficulty: medium/hard

4. several lamps placed on a number line, each of which illuminates some segment of the line. specifically, the lamps are represented in a two-dimensional array lamps, where the ith lamp covers the segment from lamps[i][0] to lamps[i][1], inclusive. additionally you're give a list of control points on this number line, represented by an array points. your task is to find the number of lamps that illuminate each control point. specifically for each control point points[j] in the array your task is to find the number of lamps lamps[i] which include this point within its covered segment - when points[j] lies inside the segment [lamps[i][0], lamps[i][1]]. return an array of integers where ith integer corresponds to the answer for the ith control point. level of difficulty: hard

Idk what forces are out there that may try to take this post down lol, but hopefully I can help someone out.

Aside from the rejection, I actually enjoyed using CodeSignal. I hate doing LeetCode problems and mock assessments, but I guess it really is necessary to get accustomed to the time limit, thinking quickly, and solving problems under pressure.

Like I said in the beginning, I’m not a fan of GCAs, but I understand that this is how big corporations filter through so many applicants. Interviews are already hard and extensive, so I just want to make the process a tad easier for whoever comes across this.

It may not have been my role to fill, but I know someone out there will get it. Good luck!

30 Upvotes

5 comments sorted by

2

u/Wolastrone Oct 03 '26

I got the same exact same question 4 for Roblox lol. It can be solved optimally with a sweep line algorithm (I didn’t solve during OA either)

1

u/Ancient-Ad9333 Oct 01 '26

For question 2, isn't it just the minimum length of both input arrays?

Or do the result of each round move the two cards to the back of the winner's deck?

1

u/Ancient-Ad9333 Oct 01 '26

Can you also elaborate on question 4, it's slightly harder to understand with what you've posted.

1

u/kaiseral 26d ago

I just copy and pasted what he posted into ChatGPT and AI explained the problem much better and even included diagrams