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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -