using Anki to think about algorithm design problems
Impetus
- There's not much special about using Anki to think about algorithm problems (aka leetcode practice). The motivation for the use is simply to help remember whatever should be remembered when thinking towards a solution to a problem. "Whatever should be remembered" includes any of; problem statement, constraints, solution, etc.
- From documenting p-knuthGo to text →
-
It is usually the case that it is the thought process towards a solution (EDIT: or rather, it is the conditions, dependencies, reasons, intent, hows, whys (why this condition in the for loop), &.c within the code for the algorithm/solution) for a problem that one would want to remember. This is most times difficult to do for non-simple problems or for a beginner.
-
- From documenting project mnemosyneGo to text →
- So that, for example, when one thinks about coming up with a solution for an algorithm design problem, you are easily reminded of similar problems and an idea for a solution becomes close at hand.
- E.g., it will be nice to be able to easily see how solutions to the following problems on binary trees are related. Doing this involves being able to think about the chunked detail of each solution simultaneously:
- Given binary tree determine if there is a path with nodes that sum to a target number.
- Given binary search tree, determine if a target exists in one of the nodes and return that node.
- Given preorder traversal of BST in an array, return a root to the constructed BST
- Given root of binary tree, return its diameter.
- Given root of binary tree, return a root to the inverted binary tree.
- Given the root of a binary tree, return its maximum depth.
One thing I wanted to achieve was to be able to think about a good number of chunked information simultaneously so that I could easily draw-out relationships between the various information.
- What is exciting though is the possibilities of designing some cognitive tool that'll help make algorithm design practice MORE and even more effective. This MORE is possible. How?
- Inquiry: If one is proficient at implementing the solution to a related problem, what can be said about the solution of the initial problem in relation to the solution of the related problem? Will be the solution for the 'initial' be necessarily clunky? Is there a always a simpler solution?
- Binary Tree Level Order Traversal vs Binary Tree Right Side View
- From documenting p-knuthGo to text →
-
it is best to "remember" the outline of the (coded) solution to each problem—which is easier to do when you actually understand the solution—so that it is easier to think about a solution for related problems which (by definition) should build upon (or be similar to) the coded solution for the initial problem.
- The coded solution for the Maximum Depth of Binary Tree problem is similar to that of Minimum Depth of Binary Tree such that if the former is solved before the latter and the solution remembered, it is easy to implement the solution for the latter since relatively little thinking/figuring-out will be required.
- Also for Number of Islands and Max Area of Island.
-
Methods
Journal
- 2021-2022 Era: "Design an algorithm that..."
- 2022 Era: "Restate the
insert-problem-title
problem in your own words..." - 2022 Era: "How will you solve the..."
- 2023 June Era: "What is the code in the 5th section of the algorithm that solves..."
- 2023 August Era: "How many sections of code are in the algorithm that solves..."
August 15th
: Revising cards (i.e., problems, solutions, code) at a frequency of about 30 per day is inefficient strategy on memory. It is too much. You want to reduce the Maximum reviews per day to about 3.- To do this, I moved all ~364 cards tagged '
algorithm-design-problems
' to a new deck where theOptions
is correspondingly set. - On setting the Maximum reviews per day to about 3, Anki suggests "If adding 2 new cards... ...review limit should be at least 20." VIZ:
- The desired Maximum reviews per day can still be set despite that.
- Now there are 3 problems I should have working memory of for a couple of weeks before they fully become long-term.
- The question now is; with the current 'options presets', "If I come across a certain 3-problems on day 1 (today), will I come across the same 3-problem set tomorrow?"
Learning steps
,Graduating Interval
,Easy Interval
,Insertion Order
;Relearning Steps
,Minimum Interval
,Leech Threshold
,Leech Action
,Maximum Interval
,Starting Ease
,Easy bonus
,Interval Modifier
,Hard Interval
,New Interval
, so that on day 1 after seeing cards; (Merge K Lists, Subsets, and Search a 2D Matrix ~+ Kth Largest Element in an Array for example), I still see some of them on day 2 and a new one, even less of them and some more new cards on day 3. So that by the end of week 1, I very rarely see them again.
How do I set any of
- The question now is; with the current 'options presets', "If I come across a certain 3-problems on day 1 (today), will I come across the same 3-problem set tomorrow?"
- Something is wrong. I'm stiil seeing more than 3 cards per day from the new deck.
- At this moment, my Buffer superdeck has a due decks number of 42, but all the subdecks have a total of 23 due decks. The diff commes from the new ADP subdeck. It seems the options preset didn't work.
- The temporary solution is; reduce the Maximum reviews per day for the Buffer superdeck from 1000 to 20.
- At this moment, my Buffer superdeck has a due decks number of 42, but all the subdecks have a total of 23 due decks. The diff commes from the new ADP subdeck. It seems the options preset didn't work.
- It is day 2 (
August 16th
) and I did not come across the cards from day 1 I was expecting. - (
August 18th
): I have now "buried" the cards that are due tomorrow so that I, instead, come across ONLY the required 3(+1) cards I want to keep tabs on. - (
August 20th
): I have to continue burying the unwanted cards to get to see what I want. - (
August 24th
): I still haven't figured this out properly yet. - (
August 26th
): Status: put on hold.- Reason: It is tricky to implement the following while also adding one new card per day
- From using Anki to think about algorithm design problemsGo to text →
- The question now is; with the current 'options presets', "If I come across a certain 3-problems on day 1 (today), will I come across the same 3-problem set tomorrow?"
Learning steps
,Graduating Interval
,Easy Interval
,Insertion Order
;Relearning Steps
,Minimum Interval
,Leech Threshold
,Leech Action
,Maximum Interval
,Starting Ease
,Easy bonus
,Interval Modifier
,Hard Interval
,New Interval
, so that on day 1 after seeing cards; (Merge K Lists, Subsets, and Search a 2D Matrix ~+ Kth Largest Element in an Array for example), I still see some of them on day 2 and a new one, even less of them and some more new cards on day 3. So that by the end of week 1, I very rarely see them again.
How do I set any of
- The question now is; with the current 'options presets', "If I come across a certain 3-problems on day 1 (today), will I come across the same 3-problem set tomorrow?"
- I need more knowledge (https://youtu.be/Eo1HbXEiJxo)
- Reason: It is tricky to implement the following while also adding one new card per day
- (
August 28th
): Now I see all the due cards (e.g. as many as 20 per day) and just skip a lot of them.
- To do this, I moved all ~364 cards tagged '
Backlinks