The hottest Binary Trees Substack posts right now

And their main takeaways
Category
Top Technology Topics
Technology Made Simple 79 implied HN points 29 Sep 22
  1. Problem involves finding the kth largest element in a stream, not the kth distinct element.
  2. The 'KthLargest' class has methods to initialize the object with 'k' and a stream of integers, and to add integers to the stream and return the kth largest element.
  3. Constraints include bounds on 'k', the length of the array, and the values in the array, with at most 10^4 calls to the 'add' method.
Technology Made Simple 39 implied HN points 27 Jan 23
  1. The problem discussed is about validating a binary search tree, ensuring the left subtree contains smaller values, the right subtree contains greater values, and both are valid binary search trees.
  2. Examples are provided to illustrate the concept, showing a valid and an invalid binary search tree.
  3. Constraints include the number of nodes and the value ranges in the tree.
Technology Made Simple 39 implied HN points 25 Jan 23
  1. The problem discusses validating a binary search tree by checking if the left subtree contains keys less than the node's key and the right subtree contains keys greater than the node's key.
  2. It's important to ensure that both the left and right subtrees of a node are also binary search trees, following specific rules for structure and key values.
  3. Validating a binary search tree involves evaluating constraints like the number of nodes in the tree and the range of node values it can contain.
Technology Made Simple 19 implied HN points 31 Oct 21
  1. Given a complete binary tree, counting the number of nodes can be done faster than O(n) by leveraging the properties of complete binary trees.
  2. For a full binary tree, the number of nodes can be calculated using a simple formula of 2^(depth + 1) - 1, which allows for efficient calculation in O(h) operations.
  3. By recognizing the characteristics of complete binary trees, such as the presence of full sub-trees, one can strategically cut down recursion and analyze only half of the tree at each depth for faster computation.
Get a weekly roundup of the best Substack posts, by hacker news affinity: