Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. E…
My memo and playground
Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. E…
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after …
Given a string s consisting of words and spaces, return the length of the last word in the string. A word is a maxi…
To do so, you need to install Mongodb tool. https://www.mongodb.com/docs/database-tools/ To dump from Mongodb atlas To restore from dump to local Mong…
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…
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 …