java - What is the time complexity of converitng a Map to Linked list -



java - What is the time complexity of converitng a Map to Linked list -

i have map , converting linkedlist. example

list<map.entry<long, long>> list = new linkedlist<map.entry<long, long>>(unsortmap.entryset());

i need find out time complexity of doing above operation.

the complexity o(n) n number of entries. loop on entries phone call of list.add(entry).

for(entry<long,long> e : unsortmap.entryset()){ list.add(e); }

java map time-complexity

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -