Today’s exercise was Pythagorean Triplet. I solved it both with a FOR loop and also with a LINQ query. The for loop was nine times faster. If you do it the most straightforward way it is O(N^3) which tanks your[…]↓ Read the rest of this entry…
Posts Tagged #100DaysOfCode
Prime Factors was today’s exercise. Pretty straightforward. I did notice that the problem had changed since some of the community solutions shouldn’t have passed with the current instructions. On the Raspberry Pi Pico front, I finished up chapters 8 through[…]↓ Read the rest of this entry…
Less than a week from the C# track half-way point. Should I switch between tracks when I get there, start a new track, or keep going on the C# track? Anyway today’s exercise was Pascal’s Triangle. I saw someone using[…]↓ Read the rest of this entry…
Largest Series Product was today’s exercise. I tried using LINQ to compute the product, but I just got syntax errors and eventually gave up and used normal loops. The first community solution did use LINQ and it read well too.[…]↓ Read the rest of this entry…
Today’s exercise was All your Base. It took me a long time but I got it working. I wanted to convert it as I went but instead I converted the digits to a number then using modulus math and division[…]↓ Read the rest of this entry…
Today’s exercise was Accumulate. We were supposed to run a function on each item in an enumerable returning an enumerable with the results. The trick was no LINQ function, write an extension method instead. It turns out that their syntax[…]↓ Read the rest of this entry…
Today’s exercise was a little tricky. It had you adding things up by multiples. Somehow the Range Enumeration function is faster than counting by twos (or similar). Of course your count was off if you got exactly to the max[…]↓ Read the rest of this entry…
Should you really be using Enumerable.Range() and other LINQ stuff when a simple FOR loop will do. No, no you should not. It is silly and makes your code harder to read. The only reason you would do that is[…]↓ Read the rest of this entry…
Todays exercise was Resistor Color Trio. Same as before except the third does a 10^n scaling factor so we can have kilo/mega/giga ohms. For the rails API backend and the modified front end from the Django book. It looks like[…]↓ Read the rest of this entry…
With today’s exercise the number of exercises I have done in the C# track now matches the count in the Python track. There are less exercises in the Python track so that track is at the half way mark. The[…]↓ Read the rest of this entry…







