Cognition online assessment interview

Round 2 of 6 · 6 questions reported

See the whole loop
Format
Timed online coding assessment
Heads-up
Reported for Codeium and Windsurf roles from 2024 to 2026, mostly algorithm problems.

Questions Cognition asks in this round 6

  • Distinct integers that match a count of positive pair sumsCodingLockedYou are given n non-negative counts p[0..n-1]. Build n distinct integers a[0..n-1] such that no two of them add up to 0 (an element paired with itself included, so no element is…
    Possibly retired
  • Third-largest word by lengthCodingLockedGiven a list of at least three words, rank them from longest to shortest and return the word in third place. Words of the same length keep the order they had in the input.
    Last asked Mar 2026
  • Validate a Hamiltonian path given as stringsCodingLockedYou get three strings that describe an undirected graph and a proposed order of vertices: the vertex list, like "(A,B,C)", the edge list, like "(A-B,B-C)", and the order, like…
    Last asked Mar 2026