PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/J.P. Morgan

Solve tiling, probability, and nested-radical puzzles

Last updated: Mar 29, 2026

Quick Overview

This multi-part question evaluates combinatorics and algorithmic skills through 2×N and 3×N domino tiling problems, analysis of an infinite nested square root, and exact discrete probability for selecting couples, testing competencies in recurrence relations, dynamic programming reasoning, limit/closed-form evaluation, and combinatorial counting within the Coding & Algorithms domain. It is commonly asked to assess a candidate's ability to recognize and derive mathematical recurrences, translate infinite expressions into closed forms, and perform precise probability counting, representing a blend of conceptual mathematical understanding and practical algorithmic application.

  • medium
  • J.P. Morgan
  • Coding & Algorithms
  • Data Scientist

Solve tiling, probability, and nested-radical puzzles

Company: J.P. Morgan

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

You are given several independent math/coding puzzles. ## 1) Domino tiling a 2×N board You have a 2×N rectangle and an unlimited number of 1×2 and 2×1 dominoes. - **Task:** Determine the number of distinct ways to tile the 2×N rectangle exactly. - **Input:** An integer `N`. - **Output:** The number of tilings. - **Notes:** Tiles may be rotated; a tiling is different if the set of covered cell pairs differs. ## 2) Domino tiling a 3×N board You have a 3×N rectangle and the same unlimited 1×2 / 2×1 dominoes. - **Task:** Determine the number of distinct ways to tile the 3×N rectangle exactly. - **Input:** An integer `N`. - **Output:** The number of tilings. ## 3) Infinite nested square root Define \[ x = \sqrt{2 + \sqrt{2 + \sqrt{2 + \cdots}}} \] - **Task:** Compute the value of `x`. ## 4) Combinatorics probability (couples) There are 5 couples (10 people total). You randomly select 4 people uniformly from the 10. - **Task:** Compute the probability that among the 4 selected people, there are **exactly 2 complete couples** (i.e., you selected both partners from exactly two couples).

Quick Answer: This multi-part question evaluates combinatorics and algorithmic skills through 2×N and 3×N domino tiling problems, analysis of an infinite nested square root, and exact discrete probability for selecting couples, testing competencies in recurrence relations, dynamic programming reasoning, limit/closed-form evaluation, and combinatorial counting within the Coding & Algorithms domain. It is commonly asked to assess a candidate's ability to recognize and derive mathematical recurrences, translate infinite expressions into closed forms, and perform precise probability counting, representing a blend of conceptual mathematical understanding and practical algorithmic application.

Related Interview Questions

  • Implement Integer Square Root - J.P. Morgan (medium)
  • Implement KNN from Scratch - J.P. Morgan (medium)
  • Minimize Operations to Balance Shipments - J.P. Morgan (medium)
  • Solve scheduling and collision problems - J.P. Morgan (medium)
  • Design an autocomplete suggestions API - J.P. Morgan (easy)
J.P. Morgan logo
J.P. Morgan
Jan 22, 2026, 12:00 AM
Data Scientist
Onsite
Coding & Algorithms
2
0
Loading...

You are given several independent math/coding puzzles.

1) Domino tiling a 2×N board

You have a 2×N rectangle and an unlimited number of 1×2 and 2×1 dominoes.

  • Task: Determine the number of distinct ways to tile the 2×N rectangle exactly.
  • Input: An integer N .
  • Output: The number of tilings.
  • Notes: Tiles may be rotated; a tiling is different if the set of covered cell pairs differs.

2) Domino tiling a 3×N board

You have a 3×N rectangle and the same unlimited 1×2 / 2×1 dominoes.

  • Task: Determine the number of distinct ways to tile the 3×N rectangle exactly.
  • Input: An integer N .
  • Output: The number of tilings.

3) Infinite nested square root

Define

x=2+2+2+⋯x = \sqrt{2 + \sqrt{2 + \sqrt{2 + \cdots}}}x=2+2+2+⋯​​​

  • Task: Compute the value of x .

4) Combinatorics probability (couples)

There are 5 couples (10 people total). You randomly select 4 people uniformly from the 10.

  • Task: Compute the probability that among the 4 selected people, there are exactly 2 complete couples (i.e., you selected both partners from exactly two couples).

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More J.P. Morgan•More Data Scientist•J.P. Morgan Data Scientist•J.P. Morgan Coding & Algorithms•Data Scientist Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.