Another good strategy for DS is to test numbers. However, this strategy is not as effective if you don’t test the number strategically. For example, if you have a problem that asks if is x positive and (I) says x^{2 }< x testing only positive integers won’t tell you much about x. For example, this in untrue for all positive integers above 1, which might lead you to believe that x is not positive. However, the best way to test numbers is to test numbers that are different from each other in fraction vs. whole, positive vs. negative etc., like so:

Testing these different numbers, made us realize that the values that work for x fractions greater than 0 and less than 1, so x is in fact is positive. If you have to create a chart that makes things easier, like the one above you can do that on your notepad. You can even label them for the different aspects you need to hit, such as:

- positive whole
- negative whole
- positive fraction
- negative fraction
- 0

Its also important to pick simple numbers. If you pick overly complicated numbers, it will take you much longer to complete the calculations to test the actual numbers.

0 comments… add one