mirror of
https://github.com/zrwusa/data-structure-typed.git
synced 2024-11-15 09:44:05 +00:00
11 lines
415 B
TypeScript
11 lines
415 B
TypeScript
import {BinaryTreeNode} from '../data-structures';
|
|
import {BinaryTreeDeletedResult, BinaryTreeNodeKey} from '../types';
|
|
|
|
export interface IBinaryTree<N extends BinaryTreeNode<N['val'], N>> {
|
|
createNode(key: BinaryTreeNodeKey, val?: N['val']): N;
|
|
|
|
add(keyOrNode: BinaryTreeNodeKey | N | null, val?: N['val']): N | null | undefined;
|
|
|
|
// delete(keyOrNode: BinaryTreeNodeKey | N): BinaryTreeDeletedResult<N>[];
|
|
}
|