Questions tagged [list]
The list tag has no usage guidance.
98
questions
0
votes
5
answers
533
views
Naming - Lists - All elements except the last
When it comes to lists there are good, short and nice sounding names for most parts of list
Head
Tail
Last - somewhat commonly used
Currently I am doing a lots of TypeScript type manipulation and ...
0
votes
3
answers
109
views
How multiple type lists are stored in memory?
Arrays are stored in a linear fashion, with memory cells of fixed size for each element. To have fixed sized memory cells Arrays should be homogenious. So in Arrays we get an Nth element by skipping ...
2
votes
3
answers
825
views
How to keep track of Indices
I've discovered my biggest issue with practicing interview questions and writing software more generally is keeping track of indices in python, maybe partly because my first two languages were the 1-...
-3
votes
3
answers
436
views
Can be logic around `List<T>.Enumerator._version` considered control flow exploitation?
List<T>.Enumerator “snapshots” list version upon creation by _version = list._version;. This allows enumerator to halt enumeration when List<T> changed during it.
This behavior likely ...
1
vote
2
answers
598
views
Depicting association between list and a class inside this list in UML
I'm making an UML class diagram representing classes used for authentication.
There are 3 classes:
X509AuthenticationFilter
ProviderManager
X509AuthenticationProvider
The X509AuthenticationFilter ...
1
vote
2
answers
272
views
Granularity of a Method
I have a general design question. Suppose I have a List:
List<String> list = new ArrayList<>();
list.add("Str 1");
list.add("Str 2");
list.add("Str 3");
I ...
-1
votes
1
answer
1k
views
Will conversion of a string to a list, and vice versa count in time complexity?
Assume that there is a question where a string needs to be passed. Some modification needs to be done on the string and then returned back.
For the programming languages like C where a string is a ...
-4
votes
1
answer
252
views
Python: Help with replacing list comprehension with generators [closed]
I have written the following code which takes a coord_list of points in a 2D coordinate system, a center and a radius and returns a list of all points from the list having distance at most radius from ...
8
votes
2
answers
6k
views
Is there a sensible way to sort coordinates?
Sorting is generally used to solve problems where distance between elements matters. A sorted list/array has the convenient property that the smaller the difference between the indices of any two ...
0
votes
0
answers
50
views
Drag and drop and handling huge amount of documents to update position
I'm having a series of data as documents in a document db (CouchDB)
Sample of a document looks like below
{
_id: xxx
_rev: xxx
data: xxx
position: 1
}
These documents displays in a web front-end ...
0
votes
1
answer
65
views
Remember initial order of list while editing it
The table
Let's say we are running a webapplication for the Superhero Association. In there, there is a table of 1 000 000 super villains which need to be watched. Everytime a super hero gathers new ...
11
votes
1
answer
2k
views
Why List<T>.Enumerator is struct?
During my investigations of List<T> enumeration I noticed List<T>.Enumerator is struct. In opposite for instance to System.Array.SZArrayEnumerator or System.SZArrayHelper....
-1
votes
2
answers
794
views
When should I use a database instead of a list? [duplicate]
New to Python and all things database related. Wondering when I should consider using a database and why?
I have what is essentially a list of objects that is around 30000 lines long. I'm developing a ...
-2
votes
1
answer
78
views
Find circular references of first order (bi-directional referencing)
I have million of objects, each with an array smaller than 10 elements, which are the names of other objects in the dataset.
Basically
{
a:[b,c,d,],
b:[c,d,e],
c:[a,e,f],
...
e:[a,b,c]
}
will ...
-3
votes
1
answer
2k
views
C# is fantastic, if only List 'd respect Remove&Return [closed]
In the domain of system-modeling (e, systemVerilog, matlab, phyton), lists are obsoleting arrays, stacks and queues(*) altogether. Other domains that use python, perl and ruby have that same mindset, ...