STL solution


  • 0
    T

    Essentially you it's asked to implement this:

    return std::distance(nums.begin(), std::remove(nums.begin(), nums.end(), val));
    

Log in to reply
 

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