FastPrepSurvey Table: Group Given an Answer
Problems/Survey Table: Group Given an Answer

Survey Table: Group Given an Answer

Susquehanna International Group (SIG) logoSusquehanna International Group (SIG)● EasyINTERNOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A 2026 report on SIG's one-hour online test for quant research and systematic trading interns includes a survey table. A thousand people's favorite exercise is counted by age band, and the question is how likely a person who prefers swimming is to be in one age band, as a fraction.

The report gives one table. We chose these. The table is an input. Rows are answers, columns are groups, every count is at least 1, and row and column totals are left out. The answer row and group column are given by index. The answer is a decimal accepted within 10^-9 (absolute or relative) instead of a fraction. The interview table is the first example.

Our version is about 90% the same as the reported question.

A survey asked people one question. counts[i][j] is the number of people who gave answer i and belong to group j (for example, an age band). Every row has the same number of groups.

You meet a person from the survey who gave answer row. Every such person is equally likely to be the one you met. Return the probability that this person belongs to group col.

Your answer is accepted if its absolute error or its relative error is at most 10^-9.

Function

conditionalShare(counts: int[][], row: int, col: int) → double

Examples

Example 1

counts = [[54,40,42,66],[77,68,90,70],[28,43,50,52],[90,78,71,81]]row = 2col = 1return = 0.24855491329479767

This is the interview survey: answers run, bike, swim and other, groups aged 18-22, 23-27, 28-32 and 33-37. The person prefers swimming (row 2), and we want ages 23-27 (column 1).

The swim row has 28 + 43 + 50 + 52 = 173 people, and 43 of them are 23-27. The answer is 43/173, about 0.2486.

Example 2

counts = [[1,3],[2,2]]row = 0col = 1return = 0.75

Row 0 has 1 + 3 = 4 people and 3 of them are in group 1, so the answer is 3/4 = 0.75. The other row does not matter.

Example 3

counts = [[5]]row = 0col = 0return = 1.0

There is only one group, so everyone with answer 0 is in group 0. The answer is 1.

Constraints

  • 1 <= counts.length <= 50
  • 1 <= counts[i].length <= 50, and every row has the same length
  • 1 <= counts[i][j] <= 10^6
  • 0 <= row < counts.length
  • 0 <= col < counts[0].length

More Susquehanna International Group (SIG) Online Assessment questions

  • Catch Fish with Reusable BaitsOA · Seen Nov 2026
  • Bold Play to Reach a GoalOA · Seen Nov 2026
  • Cats, Truth and Who Has MoreOA · Seen Nov 2026
  • Counting Cows by Their LegsOA · Seen Nov 2026
  • Enough Muffins for the LineOA · Seen Nov 2026
  • Expected Consecutive Pairs Among Chosen NumbersOA · Seen Nov 2026
  • Four-by-Four Boundary GridOA · Seen Nov 2026
  • Frog Paths Without Long RunsOA · Seen Nov 2026
  • Higher Roll, or Lose the SumOA · Seen Nov 2026
  • Is a Popular Story Fake?OA · Seen Nov 2026

Similar questions at other companies

  • Build a Gaussian Blur KernelLuma AI · OALuma AI interview questions
  • Rotate a Square Matrix 90 Degrees ClockwiseZipRecruiter · OAZipRecruiter interview questions
  • Rotate a Flat Image ClockwiseGoogle · ONSITE INTERVIEWGoogle interview questions
  • Matrix MultiplicationeBay · ONSITE INTERVIEWeBay interview questions
  • One-Nearest-Neighbor Classification with Manhattan DistanceOpenAI · PHONE SCREENOpenAI interview questions
  • Multiply Two MatricesAdobe · PHONE SCREENAdobe interview questions
  • Matrix Multiplication With and Without NumPyNVIDIA · PHONE SCREENNVIDIA interview questions
  • Adjacent Order-Statistic Gap DistributionsScale AI · PHONE SCREENScale AI interview questions
  • Linear Layer Forward and Backward PassesMeta · ONSITE INTERVIEWMeta interview questions
  • Scaled Dot-Product AttentionAmazon · PHONE SCREEN

Susquehanna International Group (SIG) interview experiences

  • SIG Quant Researcher Experienced Hire Interviews: 11 Experiences
  • SIG Quant Research Intern Interviews: 60 Experiences
  • SIG Quant Researcher New Grad Interviews: 49 Experiences
  • SIG Quant Researcher Intern Interviews: 1 Experience
  • SIG Quant Second-Round Tech Screen: 1 Experience
All Susquehanna International Group (SIG) interview questionsSee Susquehanna International Group (SIG) hiring insights
Saved
class Solution {
    public double conditionalShare(int[][] counts, int row, int col) {
        // Write your code here.
    }
}
Checking account…