How to use ordered maps in python

Revision en1, by dheemanth_1910, 2023-11-28 08:48:49

Hey all ! I've observed that using a ordered map is much better than unordered maps. (There are some cases when using a unordered map we get a TLE ) I'm using python for cp. So what would be alternative for an ordered map in python ? Thanks in advance. Try to solve this problem using ordered and unordered maps and see the difference. https://mirror.codeforces.com/contest/1899/problem/D Ps : You can't solve the problem using python dictionaries.

Tags python, hashing

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English dheemanth_1910 2023-11-28 08:48:49 493 Initial revision (published)