Salvatore Labs
  • Home
  • LeetCode
  • About
Sign in Subscribe

Arrays

A collection of 2 posts
LeetCode: 121. Best Time to Buy and Sell Stock
LeetCode

LeetCode: 121. Best Time to Buy and Sell Stock

The Problem 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 profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return
Apr 8, 2024 2 min read
LeetCode: 88. Merge Sorted Array
LeetCode

LeetCode: 88. Merge Sorted Array

The Problem You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order. The final sorted array should not be
Mar 22, 2024 2 min read
Page 1 of 1
Salvatore Labs © 2026
  • Sign up
Powered by Ghost