Format the EN markdown files.
This commit is contained in:
parent
12fc5e49eb
commit
99ad40ea26
@ -6,7 +6,7 @@ The table below lists several example data, including the input arrays and their
|
|||||||
|
|
||||||
<p align="center"> Table <id> Permutation examples </p>
|
<p align="center"> Table <id> Permutation examples </p>
|
||||||
|
|
||||||
| Input array | Permutations |
|
| Input array | Permutations |
|
||||||
| :---------- | :----------------------------------------------------------------- |
|
| :---------- | :----------------------------------------------------------------- |
|
||||||
| $[1]$ | $[1]$ |
|
| $[1]$ | $[1]$ |
|
||||||
| $[1, 2]$ | $[1, 2], [2, 1]$ |
|
| $[1, 2]$ | $[1, 2], [2, 1]$ |
|
||||||
|
|||||||
@ -10,14 +10,14 @@ The common operations in a double-ended queue are listed below, and the names of
|
|||||||
|
|
||||||
<p align="center"> Table <id> Efficiency of double-ended queue operations </p>
|
<p align="center"> Table <id> Efficiency of double-ended queue operations </p>
|
||||||
|
|
||||||
| Method Name | Description | Time Complexity |
|
| Method Name | Description | Time Complexity |
|
||||||
| ------------- | --------------------------- | --------------- |
|
| ------------- | -------------------------- | --------------- |
|
||||||
| `pushFirst()` | Add an element to the head | $O(1)$ |
|
| `pushFirst()` | Add an element to the head | $O(1)$ |
|
||||||
| `pushLast()` | Add an element to the tail | $O(1)$ |
|
| `pushLast()` | Add an element to the tail | $O(1)$ |
|
||||||
| `popFirst()` | Remove the first element | $O(1)$ |
|
| `popFirst()` | Remove the first element | $O(1)$ |
|
||||||
| `popLast()` | Remove the last element | $O(1)$ |
|
| `popLast()` | Remove the last element | $O(1)$ |
|
||||||
| `peekFirst()` | Access the first element | $O(1)$ |
|
| `peekFirst()` | Access the first element | $O(1)$ |
|
||||||
| `peekLast()` | Access the last element | $O(1)$ |
|
| `peekLast()` | Access the last element | $O(1)$ |
|
||||||
|
|
||||||
Similarly, we can directly use the double-ended queue classes implemented in programming languages:
|
Similarly, we can directly use the double-ended queue classes implemented in programming languages:
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user