Good job! I'm currently around 650ms for the number Chilli gave us. I've tried with 10 000 digits long number and resulted in 1,2 seconds if I get some more time on my hands I will look into optimization.Fonduee wrote:, about 16-20 ms.Chrajdal wrote:You first!Fonduee wrote:Hi, guys, can you reveal your execution times, i want to compare with mine xD
Coding Challenge 2
Re: Coding Challenge 2
Re: Coding Challenge 2
How do you guys measure? in debug or release?
Re: Coding Challenge 2
In release.Yumtard wrote:How do you guys measure? in debug or release?
Re: Coding Challenge 2
ok. then im at like 250-300ms. started out at 650-700ms. no idea how fonduee does it in 16-20
Re: Coding Challenge 2
oh, crap, my solution was wrong, Chili confirmed itYumtard wrote:ok. then im at like 250-300ms. started out at 650-700ms. no idea how fonduee does it in 16-20
Re: Coding Challenge 2
Fonduee wrote:oh, crap, my solution was wrong, Chili confirmed itYumtard wrote:ok. then im at like 250-300ms. started out at 650-700ms. no idea how fonduee does it in 16-20
Hopefully Chilli won't mind me giving you some test numbers so that you can be sure that you are sending correct solution.
For this number:
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
is the solution: 436
And for the number in the attachment it is: 4421
Hopefully the numbers are correct
Cheers.
- Attachments
-
- 1000digits.txt
- (1000 Bytes) Downloaded 186 times
Re: Coding Challenge 2
^ Yup (Y)
Re: Coding Challenge 2
Well, the execution time does depend on the pc you are running it on ad on the compiler settings you are using, so I'm not sure how useful comparing like this would be.
Anyways my code runs in about 1.3 seconds.
I hope Chili will show us the execution times of the best codes with the solution vid.
I'm not gonna say the complexity of my algorithm, because it could spoil the solution, but I think that would be a good way of comparing programs by efficiency.
Anyways my code runs in about 1.3 seconds.
I hope Chili will show us the execution times of the best codes with the solution vid.
I'm not gonna say the complexity of my algorithm, because it could spoil the solution, but I think that would be a good way of comparing programs by efficiency.
Re: Coding Challenge 2
You are absolutely right!MyK_00L wrote:Well, the execution time does depend on the pc you are running it on ad on the compiler settings you are using, so I'm not sure how useful comparing like this would be.
Anyways my code runs in about 1.3 seconds.
I hope Chili will show us the execution times of the best codes with the solution vid.
I'm not gonna say the complexity of my algorithm, because it could spoil the solution, but I think that would be a good way of comparing programs by efficiency.
Another way of comparing might be trying to compute bigger numbers (say 100 000 digits, or more?) Which could tell us more about the complexity growth of each program, and therefore point us to a potential winner.
Re: Coding Challenge 2
I was on the Discord and Chili said how fast his solution was...
I have mixed feelings...
He said it was 670 microseconds.
I have mixed feelings...
He said it was 670 microseconds.