Data Structures & Algorithms
237 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Regular Expression Matchinghistorical
Given a string s and a pattern p, implement regular expression matching with support for '.' and '*'.
- Binary Search Upper Boundhistorical
Implement binary search on an ascending array that may contain duplicate values. Return the position of the first value greater than or equal to the target.
- Longest Substring Without Repeating Charactershistorical
Given an array, return the length of its longest contiguous subarray without repeated elements.
- Find First and Last Position of Element in Sorted Arrayhistorical
Given an integer array nums sorted in ascending order and a target value target, find the starting and ending positions of the target value in the array.
- Evaluate Divisionhistorical
Given an array of variable pairs equations and an array of real values values as known conditions, where equations[i] = [Ai, Bi] and values[i] together represent the equation Ai / Bi = values[i].
- Counting Bitshistorical
Given a non-negative integer num. For every number i in the range 0 ≤ i ≤ num, calculate the number of 1s in its binary representation and return them as an array.
- Hamming Distancehistorical
The Hamming distance between two integers is the number of positions at which their corresponding binary bits are different.
- Binary Search Upper Boundhistorical
Implement binary search on an ascending array that may contain duplicate values. Return the position of the first value greater than or equal to the target.
- Reverse Integerhistorical
Given a 32-bit signed integer x, return the result of reversing the digits of x.
- Find First and Last Position of Element in Sorted Arrayhistorical
Given an integer array nums sorted in ascending order and a target value target, find the starting and ending positions of the target value in the array.