tagged [list]

Fastest way to check if a value exists in a list

Fastest way to check if a value exists in a list What is the fastest way to check if a value exists in a very large list?

6 Jun at 04:40

c# When should I use List and when should I use arraylist?

c# When should I use List and when should I use arraylist? As the title says when should I use `List` and when should I use `ArrayList`? Thanks

7 Apr at 12:34

finding the maximum length of lists in c#

finding the maximum length of lists in c# After I have created a list and added the contents to it, how can I find the length of the list?

8 Nov at 23:29

How does one convert a HashMap to a List in Java?

How does one convert a HashMap to a List in Java? In Java, how does one get the values of a `HashMap` returned as a `List`?

How can I turn a string into a list in Python?

How can I turn a string into a list in Python? How can I turn a string (like `'hello'`) into a list (like `[h,e,l,l,o]`)?

22 Sep at 23:11

How do I merge multiple lists into one list?

How do I merge multiple lists into one list? I have many lists: I want to merge those into a single list:

12 Sep at 08:35

C# LINQ find duplicates in List

C# LINQ find duplicates in List Using LINQ, from a `List`, how can I retrieve a list that contains entries repeated more than once and their values?

31 Aug at 11:1

Finding the index of an item in a list

Finding the index of an item in a list Given a list `["foo", "bar", "baz"]` and an item in the list `"bar"`, how do I get its index `1`?

28 Mar at 12:1

Plain, linked and double linked lists: When and Why?

Plain, linked and double linked lists: When and Why? In what situations should I use each kind of list? What are the advantages of each one?

How do I check if a variable is an array in JavaScript?

How do I check if a variable is an array in JavaScript? How do I check if a variable is an array in JavaScript?

10 Apr at 12:59

What's the fastest algorithm for sorting a linked list?

What's the fastest algorithm for sorting a linked list? I'm curious if O(n log n) is the best a linked list can do.

ArrayList vs List<> in C#

ArrayList vs List in C# What is the difference between `ArrayList` and `List` in C#? Is it only that `List` has a type while `ArrayList` doesn't?

18 Dec at 12:7

Lists: Count vs Count()

Lists: Count vs Count() Given a list, which method is preferred to determine the number of elements inside?

3 Jan at 09:55

How do I copy items from list to list without foreach?

How do I copy items from list to list without foreach? How do I transfer the items contained in one `List` to another in C# without using `foreach`?

25 Oct at 19:11

How to cast or convert List of objects to queue of objects

How to cast or convert List of objects to queue of objects How can one convert a list of objects to a queue thereby maintaining the same order?

12 Jun at 19:20

Convert contents of DataGridView to List in C#

Convert contents of DataGridView to List in C# What is the best way to grab the contents of a DataGridView and place those values into a list in C#?

27 Nov at 07:40

Get distinct items from a list

Get distinct items from a list I have a list of objects with three integer properties. How can I get the distinct values of first integer property from my list?

9 Jan at 12:18

Add to integers in a list

Add to integers in a list I have a list of integers and I was wondering if it would be possible to add to individual integers in this list.

2 Jun at 19:58

Print a list in reverse order with range()?

Print a list in reverse order with range()? How can you produce the following list with `range()` in Python?

16 Feb at 16:40

Get list of threads

Get list of threads I want to list all running threads but not by using the `List` class. I want to dynamically observe running threads. How can I do that?

19 Oct at 13:16

Remove the last N elements of a list

Remove the last N elements of a list Is there a a better way to remove the last N elements of a list.

12 Mar at 05:42

Initializing a list to a known number of elements in Python

Initializing a list to a known number of elements in Python Right now I am using a list, and was expecting something like: Should I use array instead?

28 Oct at 22:46

List to array conversion to use ravel() function

List to array conversion to use ravel() function I have a list in python and I want to convert it to an array to be able to use `ravel()` function.

29 Jun at 21:18

How to remove an element from a list by index

How to remove an element from a list by index How do I remove an element from a list ? I found `list.remove()`, but this slowly scans the list for an item .

29 Mar at 09:37

Cast IList to List

Cast IList to List I am trying to cast `IList` type to `List` type but I am getting error every time. `Model.subproduct` returns `IList`.

17 Dec at 15:47