Write a method called listUpper()
that takes in a list of strings, and returns a list of the same length containing the same strings but...
Search Results
Searching for: list
Individual Exercises
Write a method called listSearch()
that takes in a target string and a list of other strings. This method returns a (possibly shorter)...
Write a method called listLength()
that takes in a list of strings and returns a list of their lengths as integers. You must create a new...
Use appropriate method calls from the List ADT to create the following list:
< 4 19 | 23 30 >
You should assume that L is passed to...
Write a LinkedBag<T>
member method called contains()
that takes an element as a parameter and returns true if the bag contains the...
What is the complexity of searching an ArrayList?
Which of the following is a correct instantiation of an array list collection?
The local library needs help keeping track of overdue books. Currently, the library has a record of each book checked out but wishes to...
Write a method that reverses the contents of any given string array, then return the reversed conents as an arraylist. If the given array...
The Student Chapter for the Association for Computing Machinery (ACM) requested your help. Throughout the semester, attendance for the...
What interface does the Array list implement?
Do array lists automatically enlarge (or shrink) based on the size of the collection?
What is most important to know when attempting to retrieve an element from an array list?
When the index is known, what is the time complexity for accessing an element in an array list?
You’re an employee at an ice cream shop and your shop needs help organizing who’s in line. People usually come to this shop with their...
The LinearNode class is used to represent the individual nodes in a linear LinkedList. This particular LinkedList is doubly linked....
Write an algorithm that takes an ArrayList and uses a recursive binary search to return both the index of a given String, or -1 if the...
This method takes an ArrayList of Strings as a parameter and returns the longest String in the list. If the list is empty, it should...
This method takes an ArrayList of Strings as a parameter and returns the length of the longest String in the list. If the list is empty,...
This method takes an ArrayList of integers as a parameter and does not return anything. The method will expand the list with a mirrored...
This method takes an ArrayList of integers as a parameter and does not return anything. The method will remove all of the odd elements in...
This method takes an ArrayList of integers as a parameter and does not return anything. The method will repeat each odd element in the...
Write a method that reverses the contents of the given string array contents
returning an ArrayList<String>
with the resutts. If...
Complete the function countStrLongerThan()
so that it returns the count of Strings in the ArrayList<String> names
that are longer...
Complete the function removeStrLongerThan()
so that it removes from strings in the ArrayList<String> names
that are longer than ...