3 ms·
By solving the problem in more than one way! This should be very achievable in a field like discrete math. First solve the problem by hand, then model the progr
by wjholden 2y ago
By solving the problem in more than one way! This should be very achievable in a field like discrete math. First solve the problem by hand, then model the program in something like Mathematica or OR-Tools and see if you can get the same solution.
This would work even better in a lower level maths like Algebra and Calculus. Just use Mathematica's Solve[] function for many problems and you'll know if you were right or wrong.
One can also use this approach in an algorithms class. Write your own naïve program to trivially but reliably solve test cases, then compare your more sophisticated algorithms to these results. Alternatively, use a reference implementation from some other library. For example, compare your own graph algorithm solutions to what Neo4j returns.
- justin66 2y agoOr save yourself hundreds of hours and find a textbook with solutions.