Algorithm · Arista · Medium
Two independent tasks follow. For each one, implement the described behavior and explain its time and space complexity. Task 1: Palindrome Check You are given a string s. Return true exactly when s reads the same from left to right and from right to left. The empty string is considered a valid palindrome. A null reference is not a palindrome, so return false. Task 2: Missing Number with Arbitrary Start You are given an array nums whose distinct integers are sorted in…
Checking your access…