Wednesday, June 13, 2018

One push up for one missing target

June 13, 2018

Introduction


It is a drill I learned from a few professional tennis players. They warmup and practice together with their coaches in China open Beijing back in 2017.

Just once after professional tennis players practice together in Beijing, at the end of practice, they throw tennis ball and try to hit Mecerde sign from another side of court more than 20 meters away, for example, at end of 10 rounds, what you can do is to do number of pushups for your missed. I saw two professional woman players do that with their coaches. Every one is so good to do pushups.

I need to do a lot of pushups if I enumerate my mistakes in practice of algorithm and data structure past three years.

First one is to reexamine my practice using SortedSet to solve Leetcode 239: Maximum sliding window. I did not really understand what underneath of SortedSet is a binary search tree, which is red and black tree.

Because I do not pay attention enough in the practice, I made a mistake in real performance. Mix the binary tree heap data structure with a binary search tree - red black tree.

Related to physical exercise like push up, I certainly can plan to do some advanced data structure study instead. It is interesting to bring more topics in the study of data structure and algorithm. Red and black tree will be my first topic I like to review.

Comparing to use the dequeue and pruning algorithm, I think that if I study red black tree algorithm first, it will definitely will help me to come out the dequeue data structure next time.


Red and black tree


Plan to read a post here.

Argument to think about from a reddit post:


I can't remember a single time I've been asked to describe or implement a data structure beyond the simple ones (queues, stacks, tries, etc.). Focus on conceptual understanding, not nitty-gritty implementation details. You only need understand the interface and performance characteristics of a data structure. Don't think of an RB tree as an RB tree. Think of it as a generic self-balancing BST and understand the performance characteristics of this data structure. It doesn't matter if it's implemented as an RB tree, AVL tree, splay tree, etc.

No comments:

Post a Comment