You are not logged in. Please login at www.codechef.com to post your questions!

×

Question on maps stl...

What is the difference between ordered map and unordered map?

asked 29 Jul '17, 14:01

akshit9738's gravatar image

1★akshit9738
1
accept rate: 0%

Answers to such questions can be simply googled.

(29 Jul '17, 15:03) c_utkarsh5★

One of them uses a red-black tree to sort out the map's keys such that searching for a key takes $O(log(N))$ in time complexity. The other one uses a hash to store the map's keys such that searching for a key takes $O(1)$ in time complexity. You know which is which ;)

link

answered 29 Jul '17, 14:11

liaojh's gravatar image

5★liaojh
1825
accept rate: 7%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,917
×1,490
×279
×29
×2
×2

question asked: 29 Jul '17, 14:01

question was seen: 417 times

last updated: 29 Jul '17, 15:03