Design a nested transaction store | Applied Intuition Interview Question