Knapsack Problem Summary

Starting from the base knapsack problem, solve a set of related ones to it.

Bowen She

2 minute read

Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and return the largest possible value which can be collected.

Designing a URL Shortening service like TinyURL

how to design a url shortening service like TinyURL

Bowen She

1 minute read

URL shortening is used to create shorter aliases for long URLs. We call these shortened aliases “short links”. Users are redirected to the original URLs when they hit those short links. Short links save a lot of space when displayed, printed, messaged, tweeted. Additionally, users are less likely to mistype shorter URLs.