Dynamic Programming
- MUST Know EVERYTHING mentioned here in Comments
- Grokking Dynamic Programming - Educative
- us.gui
- CP 4
- solutions to CP4: github repo
- Dynamic Programming Patterns
IMPORTANT: https://codeforces.com/blog/entry/106346
IMPORTANT: https://codeforces.com/blog/entry/106346
n*(n+1)/2
non-empty subarrays/substrings.2^n-1
non-empty sub-sequences in total.2^n
) sub-sets in total.Every Subarray is a Subsequence.
Every Subsequence is a Subset.
ehen we find subset of a set we dont take a subset which is a premutation
To add to this there is usually a confusion with substrings. A substring is exactly the same thing as a subarray but in the context of strings.
Consider an array: array = [1,2,3,4]
[1,2],[1,2,3]
- is continous and maintains relative order of elements[1,2,4]
- is not continous but maintains relative order of elementsstruct
Flutter
Install for Arch Linux
- https://docs.flutter.dev/get-started/install/linux
LinkedList is faster than ArrayList while inserting and deleting elements, but it is slow while fetching each element.
Elements to be added or removed are too large, go for LinkedList. Usage of get() is more, go for ArrayList. Again, if you don’t have element access in a large number, go for LinkedList.