← Squarepoint Interview Insights

Squarepoint·Software Engineer·Technical Phone Screen·Junior

JuniorPrefer not to say
Apr 2026

Summary

Math-heavy interview for a discretionary trader role at Squarepoint. One question, no feedback, just silence while I fumbled through it. Not the most encouraging experience.

Questions Asked (1)

Q1

For an n-sided polygon, how many diagonals can be drawn by connecting all non-adjacent vertices?

Algorithms & Data Structures
Author's notes

Started with a brute-force approach, counting n-3 diagonals from the first vertex, n-4 from the second, and so on.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining that each vertex can connect to n-3 other vertices (excluding itself and its two adjacent vertices), giving n(n-3) connections. Since each diagonal is counted twice (once from each endpoint), divide by 2 to get n(n-3)/2. Then verify with small cases like a square (n=4) and pentagon (n=5) to ensure correctness.

Pro tip: Mention that this is a classic combinatorics problem and that the same reasoning applies to counting edges in a complete graph minus the polygon's sides. Also, be prepared to discuss edge cases like n<3 where no diagonals exist.

1. Understand the problem

Clarify that a diagonal connects two non-adjacent vertices of a polygon. For n<3, there are no diagonals.

2. Count connections per vertex

From any vertex, you can draw diagonals to all other vertices except itself and its two adjacent vertices, so n-3 diagonals per vertex.

3. Multiply and adjust for double counting

Multiply n by (n-3) to get total connections, but each diagonal is counted twice (once from each endpoint), so divide by 2.

4. Derive the formula

The number of diagonals is n(n-3)/2.

5. Verify with small examples

Test with n=4 (2 diagonals), n=5 (5 diagonals), and n=6 (9 diagonals) to confirm the formula.

Key Points to Mention

  • Each vertex connects to n-3 other vertices (excluding itself and two neighbors).
  • Total connections counted as n(n-3).
  • Each diagonal is counted twice, so divide by 2.
  • Final formula: n(n-3)/2.
  • Edge cases: n<3 yields 0 diagonals.
  • Connection to graph theory: diagonals are edges in a complete graph minus the polygon's sides.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.