[Adventurer] Subarray Retreat

From Help :
As you can see the naive solution iterate through an array for each start element. So the time is propotional to N * N where N is the length of the array.

19 elements ->190 cycles

Why not 19 elements ->19*19=361 cycles?

2 Likes

I got it. Comment is correct
19+18+17+ …+3+2+1 =(19/2)*20 =190

1 Like

Difference in the cycles is impressive

But then it comes to the time:
it is 5.9 seconds for dynamicMaxSum
and
it is 5.9 seconds for naiveMaxSum
This is not really impressive.

Even after a month player end up on the World map instead of the Cloudrip Mountain map

And it seems like ability to go straight to the exit is feature so and don’t sure is it worth or not the report

1 Like

ability to go straight to the exit?
i dont have that feature…
btw i can still jump over the magic missles XD this is hilarious

1 Like

You overdid it :wink:
With Pender it is as easy as

hero.moveXY( 40, 64 );
1 Like

jumping is more hilarious though…
u know why?
LOL just look at those 2 screenshots:

Photos


Versus the bottom picture:

LOL just a difference of 48.9346270895 vs 48.9346270894
that’s…0.0000000001
hopefully i got the zeroes right XD

2 Likes

lol agreed with you :smiley:
people, i’m a newbie here. (just registered as i want to learn more since i’m currently doing nothing but searching for https://rxcoupons.org or such sites because of my health issues and no money,) instead of not doing anything i decided to learn. so i would like to get some answers if possible to some of my questions… just don’t wanna ask them flat out like that since i realize that you might think that they are stupid quesitons :smiley:

1 Like

don’t be afraid to ask questions!
asking questions is how you learn.

2 Likes

should I use warrior, ranger or wizard?

1 Like

Use Pender. She just walks right through the gems! XD
Or use Ritic, he can blink right through! XD
If he’s allowed on the level
Or you can use any hero and jump over the gems. EZ

1 Like

Or you can read instructions and tasks and solve the level without “tricks” :wink:

5 Likes

XD
My code:

[I don't post solutions]

It took me 9.8 secs

1 Like

What’s for you’ve posted your code? Do you think I don’t know how to solve that level tricky way with advanced heroes?

2 Likes

@Bryukh, are you going to make an advanced version of this level?

1 Like

No. I don’t know what is “advenced version of a level”

1 Like

Harder levels based on the same level type.

1 Like

Your username offends me :rage: XD
The level is designed to be easy
we’re just making fun of it right here lol

I don’t think so. This is a really simple level which the main purpose is to demonstrate the difference between algorithm. So your jumping is the same by difficulty as a changing of one line.

Hey, guys. I’m someone who’s had Codecombat for more than 5 years now, and found an easy way to complete the level. I simply used Pender Spellbane and cast a haste spell on myself, and then ran across.

Hello and welcome to the discourse @arvindhv! Please don’t revive dead topics, Thx!

1 Like