LeetCode #121 Best Time to Buy and Sell Stock Coding Interview Problem with Java Solution

preview_player
Показать описание
LeetCode #121 Best Time to Buy and Sell Stock Coding Interview Problem with Java Solution

#Leetcode
#Best-Time-to-Buy-and-Sell-Stock
#Java
#Interview-Question
#Coding-Interview
#Arrays
#Dynamic-Programming
#Amazon-coding-Interview
#Apple-coding-Interview
#Microsoft-coding-Interview
#Adobe-coding-Interview
#Facebook-coding-Interview
#Snapchat-coding-Interview
#Google-coding-Interview
#Bloomberg-coding-Interview
#Expedia-coding-Interview
#BlackRock-coding-Interview
#Goldman-Sachs-coding-Interview
#VMWare-coding-Interview

#121. Best Time to Buy and Sell Stock
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 the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.
Рекомендации по теме
join shbcf.ru