Given two stringsSandT, each of which represents a non-negative rational number, return True if and only if they represent the same number. The strings may use parentheses to denote the repeating part of the rational number. In general a rational number can be represented using up to three ...
Top ‘K’ Numbers (easy) Kth Smallest Number (easy) ‘K’ Closest Points to the Origin (easy) Connect Ropes (easy) Top ‘K’ Frequent Numbers (medium) Frequency Sort (medium) Kth Largest Number in a Stream (medium) ‘K’ Closest Numbers (medium) Maximum Distinct Elements (medium) Sum ...
2.Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain an...
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading ze...
421 Maximum XOR of Two Numbers in an Array 50.5% Medium 423 Reconstruct Original Digits from English 45.4% Medium 424 Longest Repeating Character Replacement 43.8% Medium 427 Construct Quad Tree 55.0% Easy 429 N-ary Tree Level Order Traversal 58.5% Easy 430 Flatten a Multilevel Doubly Linked Li...
先扫描一遍数组,然后把数组中的非零元素全部拿出来存到一个non_list中,然后将list中和non_list相同index的值替换,再将list将没有填补的位置的元素全部赋成0。 程序实现: 我们先定义一个变量来存储所有的非零元素,接着扫描一遍列表,选出所有的非零元素: ...
Distinct Numbers in Each Subarray Distribute Candies to People Distribute Elements Into Two Arrays I Divide Array Into Equal Pairs Divide a String Into Groups of Size k Divisible and Non-divisible Sums Difference Dot Product of Two Sparse Vectors Drop Duplicate Rows ...
1680.Concatenation-of-Consecutive-Binary-Numbers (M) 1739.Building-Boxes (H-) 1806.Minimum-Number-of-Operations-to-Reinitialize-a-Permutation (H) 1922.Count-Good-Numbers (M) 1969.Minimum-Non-Zero-Product-of-the-Array-Elements (M+) 2128.Remove-All-Ones-With-Row-and-Column-Flips (M+) 2217...
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, exc...
2 Add Two Numbers Solution O(max(m,n)) O(1) Medium LinkedList 3 Longest Substring Without Repeating Characters Solution O(n) O(k) Medium HashMap, Sliding Window 4 Median of Two Sorted Arrays Solution ? ? Hard Divide and Conquer 5 Longest Palindromic Substring Solution O(n^2) O(1) Med...