Given the the schema presented below find two actors who cast together the most and list titles of only those movies they were casting together. Order the result set alphabetically by the movie title.
Column | Type…
Given an array of integers, find if the array contains any duplicates.
Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct.
39. Combination Sum
Given an array of distinct integers
candidates and a target integer
target, return a list of all unique combinations of
candidates where the chosen numbers sum to
target. You may return the combinations in any order.
The same number may be chosen from
candidates an unlimited number…
21. Merge Two Sorted Lists
Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists.
Input: l1 = [1,2,4], l2 = [1,3,4]
Input: l1 = , l2…
360. Sort Transformed Array
Given a sorted integer array
nums and three integers
c, apply a quadratic function of the form
f(x) = ax2 + bx + c to each element
nums[i] in the array, and return the array in a sorted order.
1196. How Many Apples Can You Put into the Basket
You have some apples, where
arr[i] is the weight of the
i-th apple. You also have a basket that can carry up to
5000 units of weight.
Return the maximum number of apples you can put in the basket.
You are asked to ensure that the first and last names of people begin with a capital letter in their passports. For example,
alison heck should be capitalised correctly as
Given a full name, your task is to capitalize the name appropriately.
A single line of input containing the full name, S.
Note: in a word only the first character is capitalized. Example 12abc when capitalized remains 12abc.
Print the capitalized string, S.
# Complete the solve function below.def solve(s):return ' '.join(word.capitalize() for word in s.split(' '))
if __name__ == '__main__':fptr = open(os.environ['OUTPUT_PATH'], 'w')s = input()result = solve(s)fptr.write(result + '\n')fptr.close()
Given the names and grades for each student in a class of students N, store them in a nested list and print the name(s) of any student(s) having the second lowest grade.
Note: If there are multiple students with the second lowest grade, order their names alphabetically and print each…
An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It corrects the calendar for the fact that our planet takes approximately 365.25 days to orbit the sun. A leap year contains a leap day.