Given a string, return true if the number of appearances of "is" anywhere in the string is equal to the number of appearances of "not"...
Search Results
Searching for: String
Individual Exercises
We'll say that a "triple" in a string is a char appearing three times in a row. Return the number of triples in the given string. The...
We'll say that a lowercase 'g' in a string is "happy" if there is another 'g' immediately to its left or right. Return true if all the...
Given a string, return the length of the largest "block" in the string. A block is a run of adjacent chars that are the same.
Given a string, look for a mirror image (backwards) string at both the beginning and end of the given string. In other words, zero or...
Given a string, return the sum of the numbers appearing in the string, ignoring all other characters. A number is a series of 1 or more...
Given a string, return a string where every appearance of the lowercase word "is" has been replaced with "is not". The word "is" should...
Write the toString member method that returns the String representation of the items in the bag in the form [item, item, item, item]. For...
Write the toString()
member method for an ArrayBasedStack. When invoked the method must return the String
representation of each entry...
Write a function in Java that implements the following logic: Given a string, if the string begins with "red" or "blue" return that color...
For this question assume the following code:
public class LinkedBag<T> implements BagInterface<T>{ private Node firstNode; ...
For the question below, assume the following implementation of LinkedStack:
public class LinkedStack<T> implements StackInterface...
or the question below, assume the following implementation of LinkedQueue:
public class ArrayQueue<T> implements QueueInterface...
For this question, assume the following implementation of the class Person and the following UML diagram
Person Class Implementation
...