lop a function that finds the starting index of the longest subsequence of values that is strictly increasing. For example, given the array {12, 3, 7, 5, 9, 8, 1, 4, 6}, the function would return 6, since the subsequence {1, 4, 6} is the longest that is strictly increasing. Develop a function that takes a string and a single character, then returns a list of the indexes in the string where the character occurs. For example, given the string “bookkeeper” and ‘e’, the function would return {5, 6, 8} since ‘e’ occurs at those p
-
Develop a function that finds the starting index of the longest subsequence of values that is strictly increasing. For example, given the array {12, 3, 7, 5, 9, 8, 1, 4, 6}, the function would return 6, since the subsequence {1, 4, 6} is the longest that is strictly increasing.
-
Develop a function that takes a string and a single character, then returns a list of the indexes in the string where the character occurs. For example, given the string “bookkeeper” and ‘e’, the function would return {5, 6, 8} since ‘e’ occurs at those positions. Return an empty list if the character does not appear in the string even once.
-
Develop a function that takes two lists of integers and returns a list containing any value that appears in both parameter lists.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images