Ad
  • Custom User Avatar

    Ranking cannot be changed (anymore)

  • Default User Avatar

    I also agree. It use to be hard for me to do a 5 kyu, or even 6 kyu, and this seemed very easy to me.

  • Default User Avatar

    I agree. This exercise seemed much easier than other 4kyu kata.

  • Custom User Avatar

    no worries, good luck :)

  • Custom User Avatar

    put simply you've returned the wrong answer, run these test cases for a more detailed and responsive version..

    
    collection = (1..24).to_a
    helper = PaginationHelper.new(collection, 10)
    
    Test.assert_equals(helper.page_count, 3, 'page_count is returning incorrect value.')
    Test.assert_equals(helper.page_item_count(1), 10, 'page_item_count is returning incorrect value.')
    Test.assert_equals(helper.page_item_count(2), 4, 'page_item_count is returning incorrect value')
    Test.assert_equals(helper.page_item_count(3), -1, 'page_item_count is returning incorrect value')
    
    Test.assert_equals(helper.page_index(23), 2, 'page_index returned incorrect value')
    Test.assert_equals(helper.page_index(24), -1, 'page_index returned incorrect value when provided a item_index argument that was out of range')
    Test.assert_equals(helper.page_index(40), -1, 'page_index returned incorrect value when provided a item_index argument that was out of range')
    Test.assert_equals(helper.page_index(3), 0, 'page_index returned incorrect value')
    Test.assert_equals(helper.page_index(-1), -1, 'page_index returned incorrect value when provided a itemIndex argument that was out of range. pageIndex(-1) should return -1')
    Test.assert_equals(helper.page_index(-23), -1, 'page_index returned incorrect value when provided a item_index argument that was out of range. pageIndex(-23) shoudl return -1')
    Test.assert_equals(helper.page_index(-15), -1, 'page_index returned incorrect value when provided a item_index argument that was out of range.')
    
    Test.assert_equals(helper.item_count, 24, 'item_count returned incorrect value')
    
    helper = PaginationHelper.new([], 10)
    Test.assert_equals(helper.page_index(0), -1, 'pageIndex(0) called when there was an empty collection')
    
    
  • Custom User Avatar

    you still haven't specified the error..
    or your actual code you've written

  • Custom User Avatar

    When reporting an issue it is very important you post information because nothing can be done when no information is supplied.

    Please post your code below and mark it as a spoiler and also add some information about the issue,

    Thanks :)

  • Custom User Avatar

    We are investigating the issue. There have been a number of issues (many unrelated) this week that have caused submission issues, this seems to be a new one.