6 kyu

Longest Strict Bouncy Subarray

183 of 584raulbc777
Description
Loading description...
Performance
Algorithms
Mathematics
Data Structures
Arrays
View
AllIssues2Questions2Suggestions7Show Resolved
  • Please sign in or sign up to leave a comment.
  • depial Avatar
  • saudiGuy Avatar

    python new test framework + a faster ref. solution is required. updated in this fork

  • ahmet_popaj Avatar

    Really interesting coding challenge, I wish I could optimize it.

  • 66  Avatar

    Please review: C++ Translation

  • AlexDRichards Avatar

    The definition of bouncy is not making sense to me. Can someone articulate it differently and see if it clicks. I can't see the rule that's determining the subarrays. Here is the closest I can get at what the definition means: FOR A GIVEN ELEMENT: # it MUST be HIGHER than one neighbor AND lower than another neighbor

    please help.

  • tomask272 Avatar

    Just solved this Kata. I think it should be 5 Kyu imho.

  • akar-0 Avatar
  • akar-0 Avatar
  • FArekkusu Avatar

    Versions in Javascript and Ruby will be released soon.

    This note should be removed.

  • rajat004 Avatar

    I could not understand the details of this kata. Could you please define it more clearly?

  • cliffstamp Avatar

    Nice effort on the Ruby test suite, that isn't going to be fun to translate.

    My Ruby solution is ugly, but decently fast so I guess that counts for something.

  • dinglemouse Avatar

    Java typo : longuestBouncyList -> longestBouncyList

  • ccgrover Avatar

    Having problems with this kata (in Java) and I'm not sure what I'm doing wrong. My current solution passes the provided sample tests, but doesn't pass the "Attempt" tests. For example, I got the following for one of the random tests:

    Test for: [-4, -1, 10, 8, 9, -2, 3, 1, 1, -7, -2, -10] of length 12. Result ----> [1, -7, -2]

    expected:<[1, -7, -2]> but was:<[-1, 10, 8, 9, -2, 3, 1]>

    The array I returned appears to be strictly bouncy and longer than the expected result. Is this array not bouncy? Am I misunderstanding what's expected? Or is it something with the kata?

    Thanks for your time!

  • Blind4Basics Avatar

    Java translation, please review and approve.

    Note that I saw you put a "performances" tag on your kata, though the tests doesn't seem that demanding in python. So implementing the same ones in java, the execution is crazy fast (note: java has an additional compilation time, on cw. About 2s...). So tell me if I have to make the tests harder and if so, to what point? What is the kind of implementations you wanna forbid?

  • Blind4Basics Avatar

    Hi,

    Warning, you misplaced the Test.it statements: you have to put the call of the user's function in between the Test.it and the test.assert_equals statements. If not, the infos the user prints to the console (if he does) are displayed before the "opening" of the test.it section.