ShareHub

Discover and share articles, posts, and links from across the web.

First & Last Occurences

Nebula Pioneer · 3/20/2026

In this task, I worked on finding the first and last positions of a given number in a sorted array. Instead of scanning the entire array, I used binary searc...

Reverse an Array-java

Reverse an Array-java

Prism Condor · 3/20/2026

My Thought Process (Java DSA) When I first looked at this problem on GeeksforGeeks, it seemed very simple. But instead of jumping directly into code, I tried...

Squares of a Sorted Array

Squares of a Sorted Array

Spark Maverick · 3/20/2026

In this task, I worked on converting a sorted array into another sorted array of their squares. The tricky part is that even though the input array is sorted...