Are we allowed to modify method signatures?


  • 0
    T

    I was trying to solve this problem https://leetcode.com/problems/reorder-list/ . Now I didn;t want to modify the method signature already given in this problem. But allocation extra memory is not allowed in this problem. So, I wrote another method that two parameters as inputs and solved it.

    Is it okay to create additional methods. Or do we have to use the exact same method signature as well? I do not see how we can solve this problem using the existing method signature


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.