Skip to content

Instantly share code, notes, and snippets.

View rishabh62's full-sized avatar
🍊

Rishabh Gour rishabh62

🍊
  • Uber
  • Bangalore
View GitHub Profile
@rishabh62
rishabh62 / leetcode-bloomberg.md
Created January 29, 2022 18:01 — 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

@rishabh62
rishabh62 / fold.js
Created May 26, 2021 18:18 — forked from kpuputti/fold.js
Functional acrobatics using folds in JavaScript.
/*eslint-env es6 */
// Inspired by the paper "A tutorial on the universality and
// expressiveness of fold" by Graham Hutton (available at
// http://www.cs.nott.ac.uk/~gmh/fold.pdf), implementing some generic
// list handling functions in JavaScript in terms of `fold`.
// Personally I had an enlightnening moment when I realised the
// beautiful interplay of cons lists and foldr during the FP101x
// Haskell course. JavaScript's syntax doesn't make this very apparent
@rishabh62
rishabh62 / System Design.md
Created April 13, 2021 18:58 — forked from kaushiknishchay/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Scalable Web Architecture and Distributed Systems

http://www.aosabook.org/en/distsys.html

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

Basic Steps

  1. Clarify and agree on the scope of the system
@rishabh62
rishabh62 / composing-software.md
Created June 14, 2020 20:19 — forked from Geoff-Ford/composing-software.md
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.