Search found 575 matches
- September 25th, 2018, 7:08 pm
- Forum: Everything
- Topic: Coding Challenge 4!
- Replies: 93
- Views: 235345
Re: Coding Challenge 4!
i is an index in the array j is another index in the array the condition is that j must be bigger than i there's a 1 at index 2 and there's a 100 at index 14 14 > 2 so we're allowed to count 100 - 1 as the difference in test 2 we're not allowed to do 34 - 23 as 0 < 1 The expected result is -1 becaus...
- September 25th, 2018, 6:34 pm
- Forum: Everything
- Topic: Coding Challenge 4!
- Replies: 93
- Views: 235345
Re: Coding Challenge 4!
I think you're confused about the problem
" Return the maximum value of v[j] - v where j > i and v[j] > v."
So the biggest difference in test 5 would be 100 - 1 = 99
" Return the maximum value of v[j] - v where j > i and v[j] > v."
So the biggest difference in test 5 would be 100 - 1 = 99
- September 24th, 2018, 4:41 pm
- Forum: Everything
- Topic: Coding Challenge 4!
- Replies: 93
- Views: 235345
Re: Coding Challenge 4!
damn you chilly. im pretty sure i knoe exactly what kind of optimizations im supposed to do. but havent been able to get it to work
- September 23rd, 2018, 2:37 pm
- Forum: Everything
- Topic: Coding Challenge 4!
- Replies: 93
- Views: 235345
Re: Coding Challenge 4!
std::thread
- September 22nd, 2018, 10:13 pm
- Forum: Everything
- Topic: Coding Challenge 4!
- Replies: 93
- Views: 235345
Re: Coding Challenge 4!
^ update to latest version of visual studio
@NightFighter
I got about 49ms on your latest test.
I'm assuming chilly will be talking nano seconds when it comes to his solution. Might look into ways to optimize this during the week if I get the time. Optimization sorcery is not my strong suit tho
@NightFighter
I got about 49ms on your latest test.
I'm assuming chilly will be talking nano seconds when it comes to his solution. Might look into ways to optimize this during the week if I get the time. Optimization sorcery is not my strong suit tho
- September 22nd, 2018, 7:30 pm
- Forum: Everything
- Topic: Coding Challenge 4!
- Replies: 93
- Views: 235345
Re: Coding Challenge 4!
Jesus that's quite a text file.
ran it 3 times in release and got
145ms, 95ms, 91ms
ran it 3 times in release and got
145ms, 95ms, 91ms
- September 22nd, 2018, 5:15 pm
- Forum: Everything
- Topic: Coding Challenge 4!
- Replies: 93
- Views: 235345
Re: Coding Challenge 4!
Submitted a very simple algorithm (maybe too simple, might've missed something in the instructions)
looking forward to having my mind blown by your optimizations
looking forward to having my mind blown by your optimizations
- September 8th, 2018, 6:28 pm
- Forum: Everything
- Topic: chilli said we need to know size of the array at the compile
- Replies: 15
- Views: 5604
Re: chilli said we need to know size of the array at the com
I was just showing that what he's trying to do is possible if you allocate on the heap. ofc you can also do so using smart pointers.
I thought using delete after new was implied
what i should've added is that vector is the way to go
I thought using delete after new was implied
what i should've added is that vector is the way to go
- September 7th, 2018, 7:19 pm
- Forum: Everything
- Topic: chilli said we need to know size of the array at the compile
- Replies: 15
- Views: 5604
Re: chilli said we need to know size of the array at the com
like mentioned you can use a vector.
or
int* array = new int[DownloadInt()];
or
int* array = new int[DownloadInt()];
- June 19th, 2018, 1:56 pm
- Forum: Everything
- Topic: Snake Class Question
- Replies: 13
- Views: 4414
Re: Snake Class Question
No problem! Gl with the rest of the game