diff --git a/docs/content/01-coding/01-arrays-and-strings/03-reverse-string.mdx b/docs/content/01-coding/01-arrays-and-strings/03-reverse-string.mdx new file mode 100644 index 0000000..8b9e564 --- /dev/null +++ b/docs/content/01-coding/01-arrays-and-strings/03-reverse-string.mdx @@ -0,0 +1,4 @@ +--- +sidebar: + icon: circle-question-mark +--- diff --git a/docs/content/01-coding/01-arrays-and-strings/meta.ts b/docs/content/01-coding/01-arrays-and-strings/meta.ts index 7781af9..119e991 100644 --- a/docs/content/01-coding/01-arrays-and-strings/meta.ts +++ b/docs/content/01-coding/01-arrays-and-strings/meta.ts @@ -1,5 +1,6 @@ import { defineMeta } from "blume"; export default defineMeta({ + title: "Arrays & Strings", order: 4, }); diff --git a/docs/content/01-coding/index.mdx b/docs/content/01-coding/index.mdx index bf0151d..13ac236 100644 --- a/docs/content/01-coding/index.mdx +++ b/docs/content/01-coding/index.mdx @@ -4,7 +4,7 @@ description: 'There are only 6 structural families. Every pattern is a traversal sidebar: label: Introduction order: 1 - icon: code + icon: power --- diff --git a/docs/content/index.mdx b/docs/content/index.mdx index 3b8a528..60c50cf 100644 --- a/docs/content/index.mdx +++ b/docs/content/index.mdx @@ -2,7 +2,7 @@ title: Goals description: Welcome to your new Blume docs. sidebar: - icon: play + icon: crosshair --- ## Coding Patterns diff --git a/work/Easy/Hash Table/387.first-unique-character-in-a-string.go b/work/Easy/Hash Table/387.first-unique-character-in-a-string.go deleted file mode 100644 index 2f15a88..0000000 --- a/work/Easy/Hash Table/387.first-unique-character-in-a-string.go +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 387. First Unique Character in a String - * Difficulty: Easy - * https://leetcode.com/problems/first-unique-character-in-a-string/ - * - * ────────────────────────────────────────────────── - * - * Given a string s, find the first non-repeating character in it and - * return its index. If it does not exist, return -1. - * - * - * - * Example 1: - * - * Input: s = "leetcode" - * - * Output: 0 - * - * Explanation: - * - * The character 'l' at index 0 is the first character that does not - * occur at any other index. - * - * Example 2: - * - * Input: s = "loveleetcode" - * - * Output: 2 - * - * Example 3: - * - * Input: s = "aabb" - * - * Output: -1 - * - * - * - * Constraints: - * - * • 1 <= s.length <= 10^5 - * - * • s consists of only lowercase English letters. - */ - -func firstUniqChar(s string) int { - freq := map[rune]int{} - for _, c := range s { - freq[c]++ - } - - for i, c := range s { - if freq[c] == 1 { - return i - } - } - return -1 -}