Code Monkey home page Code Monkey logo

splitwise-lld's Introduction

Splitwise

  1. Add/remove users

  2. Add group + add/remove users to a group

  3. Add expenses between 2 users. (p2p expense)

  4. Add group expenses. [Txn can be made within subset of people from group (ex: 10 people txn can be made within 2,3,4โ€ฆ..10 people]

  5. Implement Equal split, keep code extensible for custom split.

  6. Should be able to settle the balance between 2 users. (it should mark settlement in all groups too) Ex: user_1 owes user_2 Rs 100 as P2P User_1 owes user_2 Rs 120 in group_1 User_2 owes user_1 Rs 130 in group_2 Net Balance: (100+120)-130 = 90 There is no partial settlement as an MVP product

Extension if time allows: Split unequally/custom one person pays and custom cost for each participant in a group.

Expectation: Write a clean code keeping in mind OOPS principle and extensibility of code. Use in memory data structures to keep track of records or use in-memory db if you are comfortable.

splitwise-lld's People

Contributors

vimalvk9 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.