Coder Social home page Coder Social logo

ps's Introduction

Problem Solving

Analytics

ps is a collection of various computing problems and their corresponding solutions that I could think of. The problems range in various categories such as design, algorithms, performance optimizations, and more.

Feel free to add a Github issue for any discrepancy, typo, alternatives, or a different solution that I might not have considered. Also feel free to add issues for problems that you would like me to work upon - though it may take me a few days to research and jot my notes here.

If you wish to contribute please read the guidelines.

Dedicated to all the friends who inspired me to learn and experiment.

Notes

Algorithms

Data Structures

Design

Java Virtual Machine

Others

Draft notes/Backburner

Problems I want to jot my thoughts and notes on:

  • How to find the top-k IPs hitting a service
  • Design a scalable user authentication system
  • Design a shopping cart
  • Design a notification system
  • Design a CRON scheduler
  • Design an object-pool or a connection-pool
  • Design an email-delivery system like Mailchimp
  • Design a simlpe S3 clone
  • Build a simple Redis clone

License

MIT License

ps - Problem Solving
Copyright (c) 2016-2018, Sandeep Gupta

	https://github.com/sangupta/ps

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

ps's People

Contributors

deadcoder0904 avatar dstockto avatar mahendraramesh avatar sangupta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ps's Issues

A contribution guideline is needed

Title is quite descriptive but I'd like to add one more thing. Which language will be the base for the solutions? Is there such limit?

Java Memory management

Can you please add a article on Java Memory management. Mainly the stag & Heep.
And On the memory allocation of static variables.

Fastest Algorithm to find where the number lies

I have the following content

1,10,Jose
12,28,Daniel
33,37,Vincent

When I get a number, say 15 I need to find where it lies and what is the name.

For e.g. 30 would not have a matching name.

Which algorithm would fit here and what would be the fastest way for this. Thoughts?

Issue in Solution for fastest-sorting-integers.md

The problem stated :

Sort a given a huge array of bounded, non-duplicate, positive integers. Extend the problem to include negative integers. What are the different ways to reduce memory complexity of the problem.

is not totally clear. What does it mean that the array of integers is bounded ? Any finite amount of integers will be bounded (by Max(array)).

They is a flow in your proposed solution :

  1. Construct a boolean array of length N
  2. For every integer n in array, mark the boolean at index n in array as true
  3. Once the array iteration is complete, just iterate over the boolean array again to print all the indices that have the value set as true

Steps 1 and 2 are both O(n), however, step 3 is going to take O(max), where max is the biggest integer of the given array.

If we have for example 100 integers that are between 1 and 1000, we would have with, your algorithm 1000 steps for the step 3, whereas a traditional mergesort would be ~ 100*ln(100) ~= 461.

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.