Skip to main content

Questions tagged [list]

The tag has no usage guidance.

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 ...
Jarek's user avatar
  • 249
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 ...
forty5's user avatar
  • 39
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-...
JoeTheShmoe's user avatar
-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 ...
Yarl's user avatar
  • 288
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 ...
Joe D's user avatar
  • 113
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 ...
gaout5's user avatar
  • 41
-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 ...
Rishi Agrawal's user avatar
-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 ...
sampleuser's user avatar
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 ...
TheEnvironmentalist's user avatar
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 ...
inckka's user avatar
  • 129
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 ...
sevic's user avatar
  • 109
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....
Yarl's user avatar
  • 288
-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 ...
Numpy's user avatar
  • 121
-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 ...
DsCpp's user avatar
  • 97
-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, ...
jsonphy's user avatar
  • 47

15 30 50 per page
1
2 3 4 5
7