My C# Linq solution

  • 0


    Can someone help me in understanding what is wrong with this solution? It won't accept my solution.

        public int RemoveElement(int[] nums, int val) {
            nums = nums.Where(x => x != val).ToArray();
            return nums.Length;

Log in to reply

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