Skip to content

Instantly share code, notes, and snippets.

@Karthikdoddi
Karthikdoddi / leetcode-bloomberg.md
Created January 4, 2024 10:48 — forked from jayant91089/leetcode-bloomberg.md
Answers to leetcode questions tagged 'Bloomberg'

121 Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i.

If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.

Example 1: Input: [7, 1, 5, 3, 6, 4] Output: 5

@Karthikdoddi
Karthikdoddi / System Design.md
Created November 28, 2023 07:50 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@Karthikdoddi
Karthikdoddi / SD.md
Created November 27, 2023 08:39 — forked from Neilblaze/SD.md
Standard System Design Interview Approach Template