You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This line is setting the value to null in the Object array called data. This doesn't actually remove the element from the array, it just sets it to null. If you were to actually use this code, memory would only increase because when you call delete(), it doesn't free up anything.
The way to solve this in C# would be to create an entirely new array with a length of -1 from the original array.
The text was updated successfully, but these errors were encountered:
FYI for anyone who cares:
data-structures-and-algorithms/1. DS - Array/Array_Implementation.cs
Line 54 in cb965ea
This line is setting the value to null in the Object array called data. This doesn't actually remove the element from the array, it just sets it to null. If you were to actually use this code, memory would only increase because when you call delete(), it doesn't free up anything.
The way to solve this in C# would be to create an entirely new array with a length of -1 from the original array.
The text was updated successfully, but these errors were encountered: