Created
April 25, 2026 09:56
-
-
Save 004Ongoro/b4703ae609256f9824b050bc5c0eacd0 to your computer and use it in GitHub Desktop.
Starter template for the Tech Pulse weekly newsletter issue #2 - 25/04/2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| QUESTION | |
| Write a function findFirstUnique(input) that takes a string and returns the index of the first character | |
| that does not repeat anywhere else in the string. If every character repeats, return -1 | |
| * @param {string} s | |
| * @return {number} | |
| */ | |
| function findFirstUnique(s) { | |
| // Your logic here | |
| } | |
| // Test cases | |
| console.log(findFirstUnique("developer")); // Expected: 0 | |
| console.log(findFirstUnique("swiss")); // Expected: 1 | |
| console.log(findFirstUnique("aabb")); // Expected: -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment