Skip to content

Instantly share code, notes, and snippets.

@004Ongoro
Created April 25, 2026 09:56
Show Gist options
  • Select an option

  • Save 004Ongoro/b4703ae609256f9824b050bc5c0eacd0 to your computer and use it in GitHub Desktop.

Select an option

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
/**
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