Sort by

recency

|

904 Discussions

|

  • + 0 comments

    JAVA syntex is wrong in starting code.

    comment out line 55 : class Result { and one closing parenthesis before writing code

  • + 0 comments

    Fourth broken C# template.

    Remove class result but keep its guts. make reverse function non-public (remove public keyword).

    Geeze hackerrank -- didn't expect it that bad. And you guys test for our ability to program?

  • + 0 comments

    Here is my c++ solution, you can watch video explanation here : https://youtu.be/F4nGusqPIu0

    SinglyLinkedListNode* reverse(SinglyLinkedListNode* llist) {
        SinglyLinkedListNode* reverse = nullptr;
        while(llist != nullptr){
            SinglyLinkedListNode* newNode = new SinglyLinkedListNode(llist->data);
            newNode ->next = reverse;
            reverse = newNode;
            llist = llist->next;
        }
        return reverse;
    }
    
  • + 0 comments

    Cannot be solved via c#, its broken. Fields for the node needs to be changed to nullable.

  • + 0 comments

    Language: Java ☕

    Video solution:
    https://www.youtube.com/watch?v=5Dbh0dXG6-c

    Recursive approach

    Time complexity:
    Space complexity:

    What do you think? 😀