This tag can be used whenever the data present in the question is not ordered, that is, not following a specific pre-defined pattern
Questions tagged [unordered]
205 questions
22
votes
5 answers
Display:inline not working
I'm fairly new to html and css.
I learned the basics and a few advanced techniques but, i have been having a problem with lists for a long time and would like to know how i could possibly fix my problem.
Here's the idea.
I'm making an online shop…

Dany
- 461
- 4
- 7
- 12
14
votes
3 answers
Why use an unordered container? (C++)
I have already tried searching for this but haven't found anything.
I am learning about STL containers, and understand the pros and cons of sequential and associative containers, however am not sure why anyone would prefer an unordered container…

aspirant_sensei
- 1,568
- 1
- 16
- 36
13
votes
8 answers
Java compare unordered ArrayLists
anybody know an efficient way to decide if two arraylists contain the same values?
Code:
ArrayList dummy1= new ArrayList();
list1.put("foo");
list1.put("baa");
ArrayList dummy2= new…

Alex Tape
- 2,291
- 4
- 26
- 36
11
votes
3 answers
C++ storing a value in an unordered pair
I want to store a floating point value for an unordered pair of an integers. I am unable to find any kind of easy to understand tutorials for this. E.g for the unordered pair {i,j} I want to store a floating point value f. How do I insert, store and…

AvZ
- 997
- 3
- 14
- 25
11
votes
4 answers
Multilevel JSON diff in python
Please link me to answer if this has already been answered,
my problem is i want to get diff of multilevel json which is…

kewlkiev
- 113
- 1
- 2
- 9
9
votes
4 answers
PHP Array to List
How do I go from this multidimensional array:
Array (
[Camden Town] => Array (
[0] => La Dominican
[1] => A Lounge
),
[Coastal] => Array (
[0] => Royal Hotel
),
[Como] => Array (
[0] => Casa Producto
[1] => Casa…

Mazatec
- 11,481
- 23
- 72
- 108
7
votes
3 answers
C# Dictionary that uses an Unordered Pair as its Key?
I'm trying to create a Dictionary is C# that takes an Unordered Pair of Indices as its Key.
For example:
exampleDictionary[new UnorderedPair(x,y)] and exampleDictionary[new UnorderedPair(y,x)] should both return the same value.
Is there a way to…

FaffyWaffles
- 125
- 1
- 7
7
votes
2 answers
How can I save the original index after sorting a list?
Let's say I have the following array:
a = [4,2,3,1,4]
Then I sort it:
b = sorted(A) = [1,2,3,4,4]
How could I have a list that map where each number was, ex:
position(b,a) = [3,1,2,0,4]
to clarify this list contains the positions not…

user8920367
- 95
- 1
- 5
7
votes
5 answers
Possible to retrieve an arbitrary unordered set of named groups in one swoop with Python's re module?
This is super handy for some problems:
>>> re.search('(?P.b.).*(?P.i.)', 'abcdefghijk').groupdict()
{'i': 'hij', 'b': 'abc'}
But what if I don't know what order to expect ahead of time?
[update]
Eg, say I have an input variable containing…
Josh Adams
6
votes
4 answers
Text indentation in unordered lists with CSS
I have an unordered HTML list and am using CSS to style everything. When the text has multiple lines, it starts before the bullet point. Is there a way to make it start after the bullet point position?

Frank Vilea
- 8,323
- 20
- 65
- 86
6
votes
2 answers
How can I simplify "for x in a for y in b for z in c ..." with the unordered?
#!/usr/bin/python
#
# Description: I try to simplify the implementation of the thing below.
# Sets, such as (a,b,c), with irrelavant order are given. The goal is to
# simplify the messy "assignment", not sure of the term, below.
#
#
# QUESTION: How…

hhh
- 50,788
- 62
- 179
- 282
5
votes
4 answers
Efficiently remove duplicates, order-agnostic, from list of lists
The following list has some duplicated sublists, with elements in different order:
l1 = [
['The', 'quick', 'brown', 'fox'],
['hi', 'there'],
['jumps', 'over', 'the', 'lazy', 'dog'],
['there', 'hi'],
['jumps', 'dog',…

anon
- 836
- 2
- 9
- 25
5
votes
2 answers
Is the distinction between foldr and foldl important for maps and sets?
(This question applies more generally than to Haskell, but that's the language I'll use to state it.)
The distinction between foldl and foldr seems to depend on the fact that lists are ordered. That is, foldl and foldl collapse a list by applying a…

Jeffrey Benjamin Brown
- 3,427
- 2
- 28
- 40
5
votes
2 answers
Order Independent Hash in Java
I'd like to calculate a hash of a set of strings in Java. Yes I can sort the strings and calculate the
MD5 hash iterative using digest.update.
But I'd prefer to omit the sort and use something like combineUnordered…

Marmite Bomber
- 19,886
- 4
- 26
- 53
5
votes
3 answers
Compare arrays of objects independent of the order
I have 2 arrays of objects and I have to compare them, but the order of the objects DOES NOT matter. I can't sort them because I won't have their keys' names because the functions must be generic. The only information that I'll have about the array…

Brian Batista
- 67
- 1
- 6