Question: Implement a method LinkedList greaterThan ( LinkedList l , int i ) Return a new Linked List which contains the element in LinkedList l which

Implement a method LinkedList greaterThan(LinkedList l, int i) Return a new Linked
List which contains the element in LinkedList l which its value is greater than given
integer i.
e.g.
Input:
l: 5->6->7->1->10->20
greaterThan(l,6)
Output:
7->10->20
Input:
l: 97->99->7->1->10->20
greaterThan(l,20)
Output:
97->99
2. Find Pattern.
Implement a boolean function containPattern(String s) using Stack to find the follow-
ing special pattern in String s:
Sequence1&Sequence2
Where
Sequence 1 and Sequence 2 do not contain symbol &
Sequence 2 should be the reversed version of Sequence 1
e.g.
input: a+b&b+a
output: true

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!