mirror of
https://github.com/TheAlgorithms/Ruby
synced 2025-01-13 08:01:03 +01:00
add tests
This commit is contained in:
parent
9576b18a61
commit
74645b3e8f
1 changed files with 5 additions and 0 deletions
|
@ -78,6 +78,11 @@ def remove_element(nums, val)
|
|||
pointer1
|
||||
end
|
||||
|
||||
puts remove_elements([3,2,2,3], 3)
|
||||
# => 2
|
||||
puts remove_elements([0,1,2,2,3,0,4,2], 2)
|
||||
# => 5
|
||||
|
||||
#
|
||||
# Approach 4: Two-pointers (Optimized)
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue