Hi,
Guys i just wanted to know whether set store elements in specific order or it contains unordered elements only. As per c++ specification
http://www.cplusplus.com/reference/set/set/?kw=set
Sets are containers that store unique elements following a specific order.
As per my knowledge they are not ordered in the sense that you can't enforce an arbitrary order by placing an arbitrary element in an arbitrary position. it is usually implemented as a red-black tree and i believe due to this it is not possible to place and arbitrary element in an arbitrary position. In java the Set interface does not provide any ordering guarantees.
can-mohan 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
tinstaafl 1,176 Posting Maven
can-mohan 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.