Starting from:

$30

INFO5100-Final Quiz Solved

Question 1 
Design a class which will have final method or variable or class. An interface called iRobot is given below Which has the following methods.

 

Question 2
Given an array of strings strs, group the anagrams together. You can return the answer in any order.

An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.

Example 1:

 

Example 2:

 

Example 3:

 

Constraints:

  strs[i] consists of lowercase English letters

Question 3 (5 marks)
Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals to k.

Example 1:

 

Example 2:

 

Question 4 
. Create a class of Netflix that has list of Genre. Genre class has list of Movie. Movie class has Title of movie, Release date, List of actors, Director

 Add List of movies based on the classes created above.

For all movies released before 2000, add the string "(Classic)" to the title of the movie using flatMap.

 Get the latest 3 movies released using .limit() method of stream.

Create a predicate for release date before 2000 and a predicate for release date before 1990 and then Chain the predicates for finding movies between 1990 and 2000.

  Write a method which that will add release year in the title of the movie and return the title and then use this method for all the movies.

  Sorting on one of the feature(Ex: Released year or title) which will use comparator.

More products