mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-01 18:10:34 +08:00
misc: restructure contents
This commit is contained in:
14
contents/algorithms/permutation.md
Normal file
14
contents/algorithms/permutation.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
id: permutation
|
||||
title: Permutation
|
||||
---
|
||||
|
||||
- You are given a 7 digit phone number, and you should find all possible letter combinations based on the digit-to-letter mapping on numeric pad and return only the ones that have valid match against a given dictionary of words.
|
||||
- Give all possible letter combinations from a phone number.
|
||||
- Generate all subsets of a string.
|
||||
- Print all possible `N` pairs of balanced parentheses.
|
||||
- E.g. when `N` is `2`, the function should print `(())` and `()()`.
|
||||
- E.g. when `N` is `3`, we should get `((()))`, `(()())`, `(())()`, `()(())`, `()()()`.
|
||||
- [Source](http://blog.gainlo.co/index.php/2016/12/23/uber-interview-questions-permutations-parentheses/)
|
||||
- Given a list of arrays, return a list of arrays, where each array is a combination of one element in each given array.
|
||||
- E.g. If the input is `[[1, 2, 3], [4], [5, 6]]`, the output should be `[[1, 4, 5], [1, 4, 6], [2, 4, 5], [2, 4, 6], [3, 4, 5], [3, 4, 6]]`.
|
||||
Reference in New Issue
Block a user