Polynomial.Ai interview question

some long but easy dsa problem; then the full stack assignment;