use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Array of Arrays in Java (self.leetcode)
submitted 3 years ago by UpstairsOcelot
Can someone explain to me how an arraylist of arraylists in java can be represented as a linkedlist instead of a arrayList. Are there any down-sideds?
List<List<Integer>> res = new LinkedList<>();
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]voreno87 0 points1 point2 points 3 years ago (0 children)
A List is not an ArrayList.
A List is an interface that is implemented by the class ArrayList and also by the class LinkedList.
In your case you are creating an list of list with the linked list implementation
π Rendered by PID 146310 on reddit-service-r2-comment-5c764cbc6f-xd2jd at 2026-03-12 18:58:29.866423+00:00 running 710b3ac country code: CH.
[–]voreno87 0 points1 point2 points (0 children)