Previous question · 685
Top Host Nationality
hardDatabase
Next question · 687
Count Square Submatrices with All Ones
mediumAlgorithms
Random coding question

686. Group By Key

medium
GeneralGeneral
entry
Function contract
Inputs
pairs
list
Returns
value
dict

Examples

Input
{
  "pairs": [
    [
      "a",
      1
    ],
    [
      "b",
      2
    ],
    [
      "a",
      3
    ]
  ]
}
Output
{
  "a": [
    1,
    3
  ],
  "b": [
    2
  ]
}

Constraints

Hint 1
Hint 2
Hint 3
Roles
Software Engineer
ML Engineer
Data Engineer
Quantitative Researcher
Research Scientist
Companies
GeneralGeneral
Levels
entry
Tags
python

Similar Questions

Custom Sort Stringmedium
Algorithms
Number of 1 Bitseasy
Algorithms
Letter Case Permutationmedium
Algorithms
26 people are solving this problem
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATAINTERVIEW
Interactive coding terminal
Python environment ready.
Type a command below or run code from the editor.
run scriptExecute the current editor contents
submitGrade the current editor contents against all solution test cases
python ("print hello world")Run an isolated Python command
helpShow all available commands