code-shoily / algorithms-in-dart

Implementation of data structures and algorithms in Dart programming language.
221 stars 76 forks source link

Convert tree algorithms to not nullable #35

Closed code-shoily closed 3 years ago

code-shoily commented 3 years ago

Some ground-works have been done to make the process easier such as tighter generics types (Please look into the ADTs and nil on RedBlackTree). The process should start with removal of // @dart=2.9 on the files (module + test) and start addressing the errors by adding punctuations. The pattern for converting tests is to first append a ? on the pre-setUp variables and then append ! to all test cases (to ensure the value isn't null and are initialized, which is ensured since setUp initializes them any way). Only files that are NNBDed are tree_adt.dart and binary_tree_adt.dart.