All Posts

Leetcode 349: Intersection of Two Arrays

Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique, and you may return the result in any order.

Leetcode 383: Ransom Note

Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine. Each letter in magazine can only be used once.

Leetcode 387: First Unique Character in a String

Given a string s, find the index of the first character that does not repeat in the string. If all characters repeat, return -1.

Leetcode 392: Is Subsequence

Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence is formed by deleting some characters of t while maintaining the relative order of the remaining characters.

Leetcode 409: Longest Palindrome

Given a string consisting of lowercase and/or uppercase English letters, find the length of the longest palindrome that can be constructed from the letters in the string. Letters are case-sensitive.

Leetcode 415: Add Strings

Given two non-negative integers represented as strings, return the sum of these numbers as a string. The solution should avoid converting the strings to integers directly or using any built-in libraries for large integers.