I want to share my success in cracking two specific LeetCode problems: "Check If N and Its Double Exist" and "Squares of a Sorted Array."
Solving "Check If N and Its Double Exist"
In this challenge, I honed my array manipulation skills. I used a hash set to efficiently check if there were two distinct indices with a specific relationship. This approach resulted in a fast solution with a time complexity of O(n).
Solving "Squares of a Sorted Array"
The second challenge was about transforming a sorted array by squaring its elements while maintaining order. I embraced the two-pointer technique, efficiently navigating both sides of the array. This allowed me to create the desired sorted array in O(n) time.
Happy coding!