diff --git a/Algorithms/Easy/Remove Duplicates from Sorted Array b/Algorithms/Easy/Remove Duplicates from Sorted Array new file mode 100644 index 0000000..1d76b22 --- /dev/null +++ b/Algorithms/Easy/Remove Duplicates from Sorted Array @@ -0,0 +1,27 @@ +class Solution { + public int removeDuplicates(int[] nums) { + int x = nums.length; + int i,j,k,z=0,m=0; + for( i =0; i< x;i++) + { + k = nums[i]; + if(nums[i]!= 2147483647){ + for( j = i+1; j < x; j++ ){ + + if(k == nums[j]) { + nums[j] = 2147483647; + } + } + } + } + for(int y =0;y