Compare commits
No commits in common. "7f6439ce7c95dbfb3ac69c51e16de5a6e279d55c" and "450f1f6b5d96df43627b7b8c07518b2ec772a2da" have entirely different histories.
7f6439ce7c
...
450f1f6b5d
@ -1,6 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
import TreeNode from '../../test/tree/TreeNode'
|
|
||||||
=======
|
|
||||||
/**
|
/**
|
||||||
* Definition for a binary tree node.
|
* Definition for a binary tree node.
|
||||||
*/
|
*/
|
||||||
@ -9,7 +6,6 @@ function TreeNode(val) {
|
|||||||
this.left = this.right = null
|
this.left = this.right = null
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> 450f1f6b5d96df43627b7b8c07518b2ec772a2da
|
|
||||||
/**
|
/**
|
||||||
* @param {number[]} nums
|
* @param {number[]} nums
|
||||||
* @return {TreeNode}
|
* @return {TreeNode}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { sortedArrayToBST } from '../../src/tree/convert-sorted-array-to-binary-search-tree.js'
|
import { sortedArrayToBST } from '../../src/tree/convert-sorted-array-to-binary-search-tree.js'
|
||||||
|
|
||||||
test('将有序数组转换为二叉搜索树', () => {
|
test('将有序数组转换为二叉搜索树', () => {
|
||||||
expect(sortedArrayToBST([-10, -3, 0, 5, 9])).toEqual({ left: { left: null, right: { left: null, right: null, val: -3 }, val: -10 }, right: { left: null, right: { left: null, right: null, val: 9 }, val: 5 }, val: 0 })
|
expect(sortedArrayToBST()).toEqual()
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user