Since May Tricks has proved to be a very unpredictable client you have decided to take extra precautions. By creating a remove vertex...
Search Results
Searching for: array
Individual Exercises
[Based on an exercise at https://codeworkout.cs.vt.edu/]
Given an array of Strings, return a single String that is made up of all strings...
[Based on an exercise at https://codeworkout.cs.vt.edu/]
Given an array of int
values, return true if the group of n
numbers at the start...
[Based on an exercise at https://codeworkout.cs.vt.edu/]
Write a function in Java that takes an int
array as its parameter. It should...
[Based on an exercise at https://codeworkout.cs.vt.edu/]
Given an array containing three ints, return the sum of all the elements.
A local grocery store has asked you to design a method to verify if their produce is okay to put on the shelves. The method takes an...
[Based on an exercise at https://codeworkout.cs.vt.edu/]
Write a function in Java that returns a version of the given array where all the...
A string is a palindrome if it reads the same forward and backward, with case insensitivity. For example, the words "mom", "dad", "Mom",...
This method takes an array of integers as its parameters and returns nothing. The method moves each element in the array to the right by...
This method takes an array of integers as a parameter. It returns true if the elements in the array are unique, false otherwise. For...
This method takes an integer array as a parameter and returns true if the array includes an odd integer; otherwise, the method returns...
This method accepts two integer arrays as its parameters and returns a new array, which contains all of the elements of first parameter...
This method takes an integer array as a parameter and returns the minimum difference between adjacent values in the array. The difference...
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...
Suppose you try to perform count on items in this array {1, 4, 3, 7, 15, 9, 24} for item ‘4’. What position is item 4 in this array?
What loop would you use to increase the adult years once the age reaches 18?
Complete the function getArraySize()
so that it returns the size of the array passed in as an argument into the function. You cannot use...
Complete the function getElementAt()
so that it returns the element stored at the nth
position in the array numbers
. You may assume that...
Rewrite the function getElementAt()
so that it returns the element nth
in the array numbers
, but only if there is an element at that...
Complete the function countNegatives()
so that it counts of negative values in the array numbers
. You may assume that the array has some...
Complete the function countStrLongerThan()
so that it returns the count of Strings in the array names
that are longer than minLen
. You...