Browse W
Alphabetical listing with fast deep pagination.
66619 items • Page 1035 / 1333
Write a method splitStack that takes a stack of integers as a parameter and spli
Write a method splitStack that takes a stack of integers as a parameter and splits it into negatives and non-negatives. The numbers in the stack should be rearranged so that all t…
Write a method splitStack that takes a stack of integers as a parameter and spli
Write a method splitStack that takes a stack of integers as a parameter and splits it into negatives and non-negatives. The numbers in the stack should be rearranged so that all t…
Write a method splitStack that takes a stack of integers as a parameter and spli
Write a method splitStack that takes a stack of integers as a parameter and splits it into negatives and non-negatives. The numbers in the stack should be rearranged so that all t…
Write a method startingPoints to determine number of starting positions on the l
Write a method startingPoints to determine number of starting positions on the left side of the grid that have a path connecting to the right side of the grid. A path consists of …
Write a method stretch that stretches a linked list of integers by a specified i
Write a method stretch that stretches a linked list of integers by a specified integer value amount, so that each node of the list parameter is represented by amount copies of the…
Write a method stretch that stretches a linked list of integers by a specified i
Write a method stretch that stretches a linked list of integers by a specified integer value amount, so that each node of the list parameter is represented by amount copies of the…
Write a method stutter that accepts a Stack of integers as a parameter and repla
Write a method stutter that accepts a Stack of integers as a parameter and replaces every value in the stack with two occurrences of that value. For example, suppose a stack store…
Write a method stutter that accepts a Stack of integers as a parameter and repla
Write a method stutter that accepts a Stack of integers as a parameter and replaces every value in the stack with two occurrences of that value. For example, suppose a stack store…
Write a method stutter that takes a stack of integers as a parameter and replace
Write a method stutter that takes a stack of integers as a parameter and replaces every value in the stack with two occurrences of that value. For example, suppose the stack store…
Write a method stutter that takes a stack of integers as a parameter and replace
Write a method stutter that takes a stack of integers as a parameter and replaces every value in the stack with two occurrences of that value. For example, suppose the stack store…
Write a method subsets that uses recursive backtracking to find every possible s
Write a method subsets that uses recursive backtracking to find every possible sub-list of a given list. A sub-list of a list L contains 0 or more of L's elements. Your method sho…
Write a method swapArrayEnds() that swaps the first and last elements of its arr
Write a method swapArrayEnds() that swaps the first and last elements of its array parameter. Ex: sortArray = {10, 20, 30, 40} becomes {40, 20, 30, 10}. The array's size may diffe…
Write a method swapPairs that switches the order of values in an ArrayList of St
Write a method swapPairs that switches the order of values in an ArrayList of Strings in a pairwise fashion. Your method should switch the order of the first two values, then swit…
Write a method swapPairs that switches the order of values in an ArrayList of St
Write a method swapPairs that switches the order of values in an ArrayList of Strings in a pairwise fashion. Your method should switch the order of the first two values, then swit…
Write a method switchPai rs that switches the order of elements in a linked list
Write a method switchPairs that switches the order of elements in a linked list of integers in a pairwise fashion. Your method should switch the order of the first two values, the…
Write a method switchPai rs that switches the order of elements in a linked list
Write a method switchPairs that switches the order of elements in a linked list of integers in a pairwise fashion. Your method should switch the order of the first two values, the…
Write a method switchPairs that switches the order of elements in a linked list
Write a method switchPairs that switches the order of elements in a linked list of integers in a pairwise fashion. Your method should switch the order of the first two values, the…
Write a method switchPairs that switches the order of values in an ArrayList of
Write a method switchPairs that switches the order of values in an ArrayList of Strings in a pairwise fashion. Your method should switch the order of the first two values, then sw…
Write a method switchPairs that switches the order of values in an ArrayList of
Write a method switchPairs that switches the order of values in an ArrayList of strings in a pairwise fashion. Your method should switch the order of the first two values, then sw…
Write a method switchPairs that takes a stack of integers as a parameter and tha
Write a method switchPairs that takes a stack of integers as a parameter and that switches successive pairs of numbers starting at the bottom of the stack. For example, if the sta…
Write a method that accepts an integer array of unspecified length as a paramete
Write a method that accepts an integer array of unspecified length as a parameter. It should remove all negative values from the array and return the size of the altered array. Un…
Write a method that accepts the input of how many lines theuser wants and then p
Write a method that accepts the input of how many lines theuser wants and then prints the same number of characters to theline as the line number. Once the number of characters is…
Write a method that accepts two LinkedLists, list1 and list2 of the same length.
Write a method that accepts two LinkedLists, list1 and list2 of the same length. Each List stores integers. The method should return a merged map where the keys are the elements i…
Write a method that accepts two sorted integer arrays, a and b, and returns a so
Write a method that accepts two sorted integer arrays, a and b, and returns a sorted array containing the values stored in both a and b. In other words, your method should merge a…
Write a method that checks whether a string is a valid password. Suppose the pas
Write a method that checks whether a string is a valid password. Suppose the password rule is as follows. A password must have 8 characters, only letters and at least two digits. …
Write a method that clones a sequence/linked list. The feilds of the Seq class a
Write a method that clones a sequence/linked list. The feilds of the Seq class are... private Node head; private int manyNodes; // how many nodes are in the linked list p…
Write a method that commands a robot to face a specific direction. Your method d
Write a method that commands a robot to face a specific direction. Your method declaration should look like: public static void faceDirection (Robot r, Direction dir) { //Write yo…
Write a method that computes future investment value at a given interest rate fo
Write a method that computes future investment value at a given interest rate for a specified number of years. Use the following method header: public static double futureInvestme…
Write a method that computes future investment value at a given interest rate fo
Write a method that computes future investment value at a given interest rate for a specified number of years. The future investment is determined using the formula in Programming…
Write a method that computes future investment value at a given interest rate fo
Write a method that computes future investment value at a given interest rate for a specified number of years. The future investment is determined using the formula in Programming…
Write a method that computes the sum of the digits in an integer. Use the follow
Write a method that computes the sum of the digits in an integer. Use the following method header: public static int sumDigits(long n) For example, sumDigits(234) returns 9(2 + 3 …
Write a method that counts the number of methods implemented in a class. This me
Write a method that counts the number of methods implemented in a class. This method will not count the methods that are inherited from a superclass and not overridden in the curr…
Write a method that displays an n-by-n matrix of lowercase characters a - z usin
Write a method that displays an n-by-n matrix of lowercase characters a - z using the following method header: public static void printMatrix(int n) Each element is a lowercase ch…
Write a method that displays that uses a ListIterator to display a list in rever
Write a method that displays that uses a ListIterator to display a list in reverse order? public static void displayReverse(list myList) { //im trying to figure it out ? }
Write a method that has the following header: public static void printShuffled(S
Write a method that has the following header: public static void printShuffled(String filename) The method reads a text file, filename, sentence by sentence into an array list, sh…
Write a method that has the following header: public static void printShuffled(S
Write a method that has the following header: public static void printShuffled(String filename) The method reads a text file, filename, sentence by sentence into an array list, sh…
Write a method that has the radius of the circle passed into it. It computes the
Write a method that has the radius of the circle passed into it. It computes the area, and returns the area to the main method. Also, write a line of code that might "call" the me…
Write a method that is passed an array, x, of doubles and an integer rotation am
Write a method that is passed an array, x, of doubles and an integer rotation amount, n. The method creates a new array with the items of x moved forward by n positions. Elements …
Write a method that is passed an array, x, of doubles and an integer rotation am
Write a method that is passed an array, x, of doubles and an integer rotation amount, n. The method creates a new array with the items of x moved forward by n positions. Elements …
Write a method that meets the requirements of the following comment header block
Write a method that meets the requirements of the following comment header block. findMaxGPA the purpose of this method is to find the index of the maximum grade point average wit…
Write a method that performs a binary search. It will accept an array of doubles
Write a method that performs a binary search. It will accept an array of doubles as the fust parameter and a double precision number as the second parameter. The method will retur…
Write a method that prints the vertices in a graph visited in a breadth-first se
Write a method that prints the vertices in a graph visited in a breadth-first search (BFS) and the vertex with the maximum number of adjacent nodes. You need to fill in the approp…
Write a method that prints the vertices in a graph visited in a breadth-first se
Write a method that prints the vertices in a graph visited in a breadth-first search (BFS) and the vertex with the maximum number of adjacent nodes. You need to fill in the approp…
Write a method that receives a reference to the root of a B-tree T and a key k a
Write a method that receives a reference to the root of a B-tree T and a key k and prints the keys in the B-tree that are in the same node as k. java public class BTreeNode f priv…
Write a method that receives an array of integers as its parameter and modifies
Write a method that receives an array of integers as its parameter and modifies the contents of the array, by adding 1 the even values and subtracting 1 from the odd values. Examp…
Write a method that receives an array of integers as its parameter and modifies
Write a method that receives an array of integers as its parameter and modifies the contents of the array, by adding 1 the even values and subtracting 1 from the odd values. Examp…
Write a method that returns 1 if there is a root-to-leaf path whose node values
Write a method that returns 1 if there is a root-to-leaf path whose node values sum to target and returns 0 if there is no such root-to-leaf path. For example, in the tree below t…
Write a method that returns 1 if there is a root-to-leaf path whose node values
Write a method that returns 1 if there is a root-to-leaf path whose node values sum to target and returns 0 if there is no such root-to-leaf path. For example, in the tree below t…
Write a method that returns a message based on the day of the week and the natur
Write a method that returns a message based on the day of the week and the nature of the weather. If the day of the week is Monday, Tuesday or Wednesday and regardless of the weat…
Write a method that returns an int array of the given length that contains rando
Write a method that returns an int array of the given length that contains random integers between 0 and 9 (inclusive). The header must be: private static int[] makeRandDigits(int…