IncredibleThings

导航

2020年5月4日 #

LeetCode - Kth Smallest Element in a BST

摘要: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文

posted @ 2020-05-04 14:54 IncredibleThings 阅读(113) 评论(0) 推荐(0)

LeetCode - Count Complete Tree Nodes

摘要: Given a complete binary tree, count the number of nodes. Note: Definition of a complete binary tree from Wikipedia: In a complete binary tree every le 阅读全文

posted @ 2020-05-04 14:23 IncredibleThings 阅读(111) 评论(0) 推荐(0)