2206. Divide Array Into Equal Pairs

2206. Divide Array Into Equal PairsDifficulty: EasyTopics: Array, Hash Table, Bit Manipulation, CountingYou are given an integer array nums consisting of 2 * n integers.You need to divide nums into n ...
0 Read More

Leetcode - 205. Isomorphic Strings

Javascript Code ⛶/** * @param {string} s * @param {string} t * @return {boolean} */ var isIsomorphic = function (s, t) { if (s.length !== t.length) return false; const mapST = new Map()...
0 Read More

Leetcode - 290. Word Pattern

Javascript Code ⛶/** * @param {string} pattern * @param {string} s * @return {boolean} */ var wordPattern = function (pattern, s) { let patternMap = new Map(); let sMap = new Map(); ...
0 Read More

Leetcode - 242. Valid Anagram

Leetcode - 242. Valid Anagram
Approach 1 ⛶/** * @param {string} s * @param {string} t * @return {boolean} */ var isAnagram = function(s, t) { let sortedSArr = s.split('').sort(); let sortedTArr = t.split('').sort(); ...
0 Read More

2401. Longest Nice Subarray

2401. Longest Nice SubarrayDifficulty: MediumTopics: Array, Bit Manipulation, Sliding WindowYou are given an array nums consisting of positive integers.We call a subarray of nums nice if the bitwise A...
0 Read More

Leetcode - 56. Merge Intervals

Using Sorting Chapter 1 ⛶/** * @param {number[][]} intervals * @return {number[][]} */ function merge(intervals) { const sortInterval = intervals.sort((a, b) => a[0] - b[0]) c...
0 Read More