22 views
# Count the Number of Beautiful Subarrays (LeetCode 2651) ## Approach XOR prefix map; beautiful iff XOR=0. Track freq of each prefix XOR. ## Edge cases Empty / single-element cases. ## Practice tip Narrate tradeoffs out loud before coding. Interview prep: [Linkjob AI](https://www.linkjob.ai/).