c# equivalent for c++ vector or deque -
i should duplicate searched time , not find answer. should use in c# replace c++ vector , deque efficiently. need structure supports direct indexing effieciently , supports delete 1 or both ends(depending on vector or deque case) again in efficient manner.
in java use arraylist @ least vector c# found this source states: arraylist resizes dynamically. elements added, grows in capacity accommodate them. used in older c# programs.
. new way this? , again do deque case?
there's no built-in deque container, there several implementations available.
here's a 1 stephen cleary. provides o(1) operations index , insert @ beginning , append @ end.
the c# equivalent vector list<t>
. indexed access o(1), insertion or removal o(n) (other inserting @ end, o(1)).
Comments
Post a Comment