Problems
Previous question · 685
Top Host Nationality
hard
Database
Next question · 687
Count Square Submatrices with All Ones
medium
Algorithms
Random coding question
Python
Language
Python
Practice
Interview
AI Tutor
Description
Solution
Discussion
686. Group By Key
medium
General
entry
Function contract
Inputs
pairs
list
Returns
value
dict
Examples
Example 1
Input
{
"pairs"
:
[
[
"a"
,
1
]
,
[
"b"
,
2
]
,
[
"a"
,
3
]
]
}
Output
{
"a"
:
[
1
,
3
]
,
"b"
:
[
2
]
}
Example 2
Input Signature
Argument
Type
pairs
list
Output Signature
Return Name
Type
value
dict
Constraints
Hint 1
Hint 2
Hint 3
Roles
Software Engineer
ML Engineer
Data Engineer
Quantitative Researcher
Research Scientist
Companies
General
Levels
entry
Tags
python
Similar Questions
Custom Sort String
medium
Algorithms
Number of 1 Bits
easy
Algorithms
Letter Case Permutation
medium
Algorithms
26 people
are solving this problem
Run
Submit
00:00
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATA
INTERVIEW
Interactive coding terminal
Python environment ready.
Type a command below or run code from the editor.
run script
Execute the current editor contents
submit
Grade the current editor contents against all solution test cases
python ("print hello world")
Run an isolated Python command
help
Show all available commands
>>>