Loading [a11y]/accessibility-menu.js

Driving US On 9 Hollow Boat B Shoes Slip Loafer Casual Bumud Pink M Summer Women's Out Flat Leather OYpwc7agq

Driving US On 9 Hollow Boat B Shoes Slip Loafer Casual Bumud Pink M Summer Women's Out Flat Leather OYpwc7agq Driving US On 9 Hollow Boat B Shoes Slip Loafer Casual Bumud Pink M Summer Women's Out Flat Leather OYpwc7agq Driving US On 9 Hollow Boat B Shoes Slip Loafer Casual Bumud Pink M Summer Women's Out Flat Leather OYpwc7agq Driving US On 9 Hollow Boat B Shoes Slip Loafer Casual Bumud Pink M Summer Women's Out Flat Leather OYpwc7agq Driving US On 9 Hollow Boat B Shoes Slip Loafer Casual Bumud Pink M Summer Women's Out Flat Leather OYpwc7agq

Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.

Example:

Input: n = 4, k = 2
Output:
[
  [2,4],
  [3,4],
  [2,3],
  [1,2],
  [1,3],
  [1,4],
]

Seen this question in a real interview before?  
Yes
No
When did you encounter this question?  
last week
last month
last 3 month
last 6 month
more than 6 months
other
Which stage?  
Online Assessment
Phone Interview
On Campus Interview
Onsite Interview
Don't know
Which company?  
Adobe
Aetion
Affirm
Airbnb
Akuna Capital
Alation
Alibaba
Amazon
AppDynamics
Apple
Arista Networks
Baidu
BlackRock
Blizzard
Bloomberg
Booking.com
Box
Capital One
Cisco
Citadel
Citrix
Cloudera
Coupang
Coursera
Cryptic Studios
Ted Baker Ted Black Remadi Baker Women's 4Zqw8wv
Databricks
Dataminr
Deutsche Bank
DoorDash
Drawbridge
Dropbox
eBay
EMC
Epic Systems
Expedia
Facebook
Fallible
Flipkart
Kenneth Women Brown World Cole Toe Peep 5 Reactio Ankle Boot US Frida Rqw7g1R4
ForUsAll
Garena
GE Digital
Gilt Groupe
GoDaddy
Goldman Sachs
Goo
Google
Grab
Groupon
Hedvig
Pink Shoes Hollow Loafer B Flat Slip 9 Leather Women's Boat M Out Driving Casual Bumud US On Summer Helix
Houzz
HTC
Huawei
Hulu
IBM
IIT Bombay
Indeed
InMobi
Intel
Intuit
IXL
Jane Street
Jingchi
JPMorgan
Jump Trading
Leap Motion
Lending Club
LinkedIn
LiveRamp
Lyft
Machine Zone
MAQ Software
Mathworks
Matlab
Microsoft
Morgan Stanley
National Instruments
NetEase
Netsuite
Nutanix
Nvidia
Oracle
Palantir Technologies
Paypal
Pinterest
Pocket Gems
Pony.ai
Poynt
Leather 9 Driving Slip Hollow M B Women's Out Shoes Loafer US Summer Casual On Pink Boat Bumud Flat Pure
Pure Storage
Qualcomm
Qualtrics
Quip
Quora
Rackspace
Radius
B 9 Pink Driving Summer Casual US Women's Slip Out M Boat Shoes Hollow Loafer Bumud Flat On Leather Redfin
Riot Games
Roblox
Rubrik
 
Solid Sandals WeenFashion Toe Pointed Closed Buckle Leather Women's Patent Pink qvFwxrvt8

You have not signed in. Cannot submit your code.

C++

Compiled with g++ 6.3 using the latest C++ 14 standard.

Your code is compiled with level one optimization (-O1). AddressSanitizer is also enabled to help detect out-of-bounds and use-after-free bugs.

Most standard library headers are already included automatically for your convenience.

OK