coding challenge Weekly Coding Challenge #4 Given two strings s and t, return true if t is an anagram of s (same letters, same counts, any order), otherwise false. Examples * s = "anagram", t = "nagaram" → true * s = "rat", t = "car" → false Constraints * 1 <= s.length, t.length <
coding challenge Weekly Coding Challenge #3: Contains Duplicate (+ Challenge #2 Solution) This Week. Contains Duplicate Given an integer array nums, return true if any value appears at least twice, and false if every element is distinct. Constraints: 1 <= nums.length <= 10^5, -10^9 <= nums[i] <= 10^9 Example 1: nums = [1,2,3,1] → true Example
coding challenge Weekly Coding Challenge #2: Best Time to Buy and Sell Stock Problem: You're given an array prices where prices[i] is the price of a stock on day i. You want to maximize profit by choosing a single day to buy and a different, later day to sell. Return the maximum profit achievable, or 0 if no profit is
coding challenge Weekly Coding Challenge #1: Two Sum Starting today, I'm running a weekly coding challenge here — styled like a newspaper Sunday crossword. Each problem posts on a Sunday, and its solution is revealed the following Sunday, right alongside the next problem. No immediate spoilers, so there's a full week to actually work through