Last active
March 10, 2018 07:25
-
-
Save meetzaveri/e5a3f1b2d0eae38606f499d8c8570883 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var invalidChar = 'b'; | |
var arr = [ 'a', 'b', 'b', 'd', 'e' ]; | |
var ptr = 0, n = arr.Length; | |
for (int i = 0; i < N; i++){ | |
if (arr[i] != invalidChar) { | |
arr[ptr] = arr[i]; | |
ptr++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment