Brandon - MATLAB Cody - MATLAB Central

Brandon

223
Rank
31
Badges
6292
Score
51 – 100 of 706

Brandon received Cody Challenge Master badge

on 27 Jun 2023

Brandon submitted Solution 11610918 to Problem 27. Pangrams!

on 27 Jun 2023

Brandon submitted Solution 11604723 to Problem 43. Subset Sum

on 26 Jun 2023

Brandon submitted a Comment to Solution 1031317

This is the first correct solution to this problem. It took 4.5 years and 500 wrong solutions for someone to finally get a universal answer.

on 26 Jun 2023

Brandon submitted a Comment to Problem 52. What is the next step in Conway's Life?

There's a popular solution that is wrong, and people keep posting it. I am highly amused.

on 26 Jun 2023

Brandon submitted a Comment to Solution 11603368

I made a solution explaining the three common approaches to solving the problem. All three solutions have a small Cody size, but have drastically different speeds when implemented in code.

on 26 Jun 2023

Brandon submitted a Comment to Solution 363899

It's a much faster implementation of num2str() than any other solution I have seen. Due to it formatting the inputs and using the second column, it avoids the searching problems that other num2str() solutions often have. This solution can be further optimized by avoiding the use of num2str() and calling sprintfc() directly.

on 26 Jun 2023

Brandon submitted a Comment to Problem 47. Extract leading non-zero digit

Today I learned that 0.3/0.1 = 2.999999999 but 0.3*10=3 Floats always keep things... interesting...

on 26 Jun 2023

Brandon submitted a Comment to Solution 11101189

How does this solution escape the floating point problem for x=0.3? raising to the negative power seems to be superior than dividing by the positive power?

on 26 Jun 2023

Brandon submitted a Comment to Solution 113233

A great example of slow code, this solution takes 4.5 seconds to run through 1000 random numbers. My solution takes a millisecond. Cody "size" is such a poor measure of good code...

on 26 Jun 2023

Brandon submitted a Comment to Problem 48. Making change

A lot of people are adding an amount smaller than a cent to the input to get around floating point issues. There are two other ways to get around this. One is to make the last cent 0.00999 instead. The other is to change your comparison line to compare against a slightly smaller/larger value.

on 23 Jun 2023

Brandon submitted a Comment to Solution 1836460

Could have reduced the 1 in a/change(i)>=1 to 0.999 as well.

on 23 Jun 2023

Brandon submitted a Comment to Problem 9. Who Has the Most Change?

I have tagged this problem as stupid. I encourage others to do the same. This is a place to learn, not to ask trick questions.

on 23 Jun 2023

Brandon submitted a Comment to Problem 9. Who Has the Most Change?

Can we ban stupid problems like this? Like, how do I report a problem to have it moderated out of existence?

on 23 Jun 2023

51 – 100 of 706
Go to top of page