Database Project: Project Architecture and Design
In this post, I’ll walk through the framework and architecture of my project, explain the module separation, and share why I structured the system in this way.
In this post, I’ll walk through the framework and architecture of my project, explain the module separation, and share why I structured the system in this way.
We solve the subarray product problem either with a sliding window in O(n), or by transforming products into prefix sums via logarithms and applying binary search in O(n log n).
If two prefix sums have the same remainder modulo k, their difference is divisible by k.
The O(n^2) Solution is easy to understand, so I will just explain why the Hash Table works.