GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • rulcode
  • Sign In

This view

  • Original page
  • New address

GeezerVison is showing rulcode.com — Combinations Visualizer & Solution | Rulcode

Fetching algorithms...

    Combinations Visualizer & Solution | Rulcode
    Loading problem details...

    43. Combinations

    Medium
    Topics
    Hint

    Understand Before Coding

    Visualize This Problem
    Open Visualizer
    Draw Your Approach
    Draw

    Example 1:

    Input: n = 4, k = 2
    Output: [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
    Explanation: All possible combinations of 2 numbers chosen from the range [1, 4].

    Example 2:

    Input: n = 1, k = 1
    Output: [[1]]
    Explanation: The only possible combination of 1 number chosen from the range [1, 1].

    Constraints:

    • •
    • •

    Time Complexity

    O(C(n,k))

    Space Complexity

    O(k)

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.