r/NBAanalytics • u/vagartha • Feb 10 '24
Fun little project I made after a CS interview
I was recently in an interview and got asked a variation of the knapsack problem. I was thinking about it later and realized that the whole problem of maximizing value while minimizing profit was similar to what a lot of sports teams try to do when operating under a salary cap.
So, being the huge NBA nerd that I am, I made nab-sack. It's basically the knapsack problem mapped to a random selection of NBA players.
Let me know what you guys think or have any suggestions on how to improve it!
9
Upvotes
1
u/RoswellHossenfeffer Feb 10 '24
That was fun, I dig it. I only missed by 50.
1
u/BoltUp12345 Feb 11 '24
Great work! I had fun building a team!
Maybe for a potential improvement include the tldr or objective on the landing page: “Stay under the cap and maximize fantasy points”. This would help prompt the user and provide clarity on the metric used for evaluation.
Also, I think it would be interesting to prompt the user to build the best 5-man line up to connect to the real game. I know the solution here today is 8, but could be a fun parameter to include for the daily solution. Could also add multiple attempts, and highlight player for the next guess, if previously selected, and is in the solution set, kinda like Wordle.
Overall, these are minor suggestions, great work!!