Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L…
My memo and playground
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L…
There are n gas stations along a circular route, where the amount of gas at the ith station is gas[i]. You have a car with an…
Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of&n…
Given an array of integers citations where citations[i] is the number of citations a researcher received for their ith p…
You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums[0]. Each element …
You are given an integer array nums. You are initially positioned at the array’s first index, and each element in the array represents…
You are given an integer array prices where prices[i] is the price of a given stock on the ith day. On each day, you may…
You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your pr…
Given an integer array nums, rotate the array to the right by k steps, where k is non-negative. Input: nums = [1,2,3,4,5,6,7], k = 3 Output: [5,6,7,1,…
Given an array nums of size n, return the majority element. The majority element is the element that appears more than ⌊n / 2⌋ tim…