Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f361d42

Browse files
committedNov 2, 2023
docs: add problem description for palindrome partitioning
1 parent 307e0f4 commit f361d42

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
 

‎src/medium/readme.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,36 @@ Put the code below in main.rs and run `cargo run`
689689
println!("result: {}", result);
690690
```
691691

692+
693+
# 131. Palindrome Partitioning
694+
695+
## Description
696+
697+
Given a string s, partition s such that every substring of the partition is a palindrome.
698+
699+
Return all possible palindrome partitioning of s.
700+
701+
## Examples
702+
703+
```text
704+
Input: "aab"
705+
Output:
706+
[
707+
["a","a","b"],
708+
["aa","b"],
709+
]
710+
```
711+
712+
## How to Run in main.rs
713+
714+
Put the code below in main.rs and run `cargo run`
715+
716+
```rust
717+
let s = String::from("aab");
718+
let result = leetcode::medium::palindrome_partitioning::partition(s);
719+
println!("result: {:?}", result);
720+
```
721+
692722
# 138. Copy List with Random Pointer
693723

694724
## Description

‎src/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
- [x] [102. Binary tree level order traversal](../src/medium/binary_tree_level_order_traversal.rs) -> [Problem Description](../src/medium/readme.md#102-binary-tree-level-order-traversal)
6565
- [x] [105. Construct binary tree from preorder and inorder traversal](../src/medium/construct_binary_tree_from_preorder_and_inorder_traversal.rs) -> [Problem Description](../src/medium/readme.md#105-construct-binary-tree-from-preorder-and-inorder-traversal)
6666
- [x] [128. Longest consecutive sequence](../src/medium/longest_consecutive_sequence.rs) -> [Problem Description](../src/medium/readme.md#128-longest-consecutive-sequence)
67+
- [x] [131. Palindrome partitioning](../src/medium/palindrome_partitioning.rs) -> [Problem Description](../src/medium/readme.md#131-palindrome-partitioning)
6768
- [-] [138. Copy list with random pointer](../src/medium/copy_list_with_random_pointer.rs) -> [Problem Description](../src/medium/readme.md#138-copy-list-with-random-pointer)
6869
- [x] [143. Reorder list](../src/medium/reorder_list.rs) -> [Problem Description](../src/medium/readme.md#143-reorder-list)
6970
- [x] [146. LRU cache](../src/medium/lru_cache.rs) -> [Problem Description](../src/medium/readme.md#146-lru-cache)

0 commit comments

Comments
 (0)
Please sign in to comment.