Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 1.14 KB

File metadata and controls

12 lines (10 loc) · 1.14 KB

THIS FILE CONTAINS ASSUMPTIONS MADE DURING DEVELOPMENT

  1. The program needs to read the input from standard output, so I decided to use cats-effects Console[IO] cause it is blocking
  2. If the program could work on very large inputs I would wrap algorithmic part into IO.delay for deffering pure computations.
  3. I think I made wrong assumption that the input should be only console, I will focus now on input validation and making the code split into reusable blocks. Then I will get back to different input handling when the time allows
  4. I think it is good to replace List[List[Int]] representing triangle and rather put that in some better structure that the Calculator could use it, also, I think I will switch to Vector[Vector[Int]] which I beleive has better read and traversal performance
  5. When building Triangle structure I need to check again if the row length is valid, since Triangle.from is public method to use
  6. If we have only a file no stdin we could read the file backward and not load all triangle to the memory. Could be efficient for very large files
  7. Now when Stdin reader is in place the console one is not needed I suppose