Skip to content

Commit 49326ee

Browse files
committed
https://leetcode.cn/problems/plus-one/
1 parent baa5d75 commit 49326ee

File tree

32 files changed

+1772
-14
lines changed

32 files changed

+1772
-14
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ leetcode 测试
1010

1111
##### 包含的内容如下
1212

13+
https://leetcode.cn/problems/plus-one/
14+
1315
https://leetcode.cn/problems/a-number-after-a-double-reversal/
1416

1517
https://leetcode.cn/problems/minimum-time-difference/
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export default function isSameAfterReversals(num: number): boolean {
2-
return num == 0 || num % 10 > 0;
3-
}
1+
export default function isSameAfterReversals(num: number): boolean {
2+
return num == 0 || num % 10 > 0;
3+
}

abbreviating-the-product-of-a-range/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
2+
23
import abbreviateProduct from "./index.ts";
34

45
Deno.test("abbreviating-the-product-of-a-range", () => {

concatenated-words/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import {
2+
PrefixTreeInsert,
3+
} from "../design-add-and-search-words-data-structure/PrefixTreeInsert.ts";
14
import { PrefixTree } from "../implement-trie-prefix-tree/PrefixTree.ts";
2-
import { PrefixTreeInsert } from "../design-add-and-search-words-data-structure/PrefixTreeInsert.ts";
35

46
export default function findAllConcatenatedWordsInADict(
57
words: string[],

concatenation-of-array/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { assertEquals } from "asserts";
2+
23
import getConcatenation from "./index.ts";
4+
35
Deno.test("concatenation-of-array", () => {
46
assertEquals(
57
[[1, 2, 1], [1, 3, 2, 1], [

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"importMap": "import_map.json",
1313
"tasks": {
14-
"udd": " deno run -A https://deno.land/x/udd/main.ts '*.json' deps.ts '*.ts' '*/*.ts'",
14+
"udd": " deno run -A https://deno.land/x/udd@0.7.5/main.ts '*.json' deps.ts '*.ts' '*/*.ts'",
1515
"install-udd": "deno install -A -f -n udd https://deno.land/x/[email protected]/main.ts",
1616
"fmt": " deno fmt --config deno.json",
1717
"test": "deno test --parallel --unstable -A --config deno.json",

design-an-expression-tree-with-evaluate-function/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
2+
23
import { default as TreeBuilder } from "./index.ts";
4+
35
Deno.test("design-an-expression-tree-with-evaluate-function", () => {
46
assertEquals(
57
[

er-cha-sou-suo-shu-yu-shuang-xiang-lian-biao-lcof/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { assertEquals } from "asserts";
2+
23
import { TreeNodeLeetCodeFromJSON } from "../utils/TreeNodeLeetCodeParse.ts";
34
import { ArrayToCircularDoublyTreeList } from "./ArrayToCircularDoublyTreeList.ts";
45
import treeToDoublyList from "./index.ts";
6+
57
Deno.test("er-cha-sou-suo-shu-yu-shuang-xiang-lian-biao-lcof", () => {
68
const inputs = [
79
[

evaluate-reverse-polish-notation/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
2+
23
import evalRPN from "./index.ts";
4+
35
Deno.test("evaluate-reverse-polish-notation", () => {
46
assertEquals(
57
[

find-first-and-last-position-of-element-in-sorted-array/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
2+
23
import searchRange from "./index.ts";
4+
35
Deno.test("find-first-and-last-position-of-element-in-sorted-array", () => {
46
const inputs: [nums: number[], target: number][] = [
57
[[5, 7, 7, 8, 8, 10], 8],

0 commit comments

Comments
 (0)