Skip to main content

All Questions

4 votes
2 answers
315 views

LeetCode: House Robber III C#

https://leetcode.com/problems/house-robber-iii/ Please review for performance The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "...
Gilad's user avatar
  • 5,293
4 votes
1 answer
174 views

Counting increasing subsequences with a "hacker's" Binary Index Tree

This is an \$O(n \sqrt n)\$ solution to the the following problem: Given a sequence, compute the number of non-empty increasing subsequences The algorithm is to compute ...
Elliot Gorokhovsky's user avatar