摘要:
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Example 1: Input: [[1,1],[2,2],[3,3]] Output: 3 Ex 阅读全文
摘要:
You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the w 阅读全文
摘要:
You are given an array target that consists of distinct integers and another integer array arr that can have duplicates. In one operation, you can ins 阅读全文
摘要:
You are given a two-dimensional list of integers matrix. You are currently at the top left corner and want to move to the bottom right corner. In each 阅读全文
摘要:
You are given a list of integers nums and an integer k. Consider an operation where you increment any one element once(increase by 1). Given that you 阅读全文
摘要:
A split of an integer array is good if: The array is split into three non-empty contiguous subarrays - named left, mid, right respectively from left t 阅读全文
摘要:
You are given an integer array nums of even length n and an integer limit. In one move, you can replace any integer from nums with another integer bet 阅读全文
摘要:
An undirected graph of n nodes is defined by edgeList, where edgeList[i] = [ui, vi, disi] denotes an edge between nodes ui and vi with distance disi. 阅读全文
摘要:
Given an array A of integers, for each integer A[i] we need to choose either x = -K or x = K, and add x to A[i] (only once). After this process, we ha 阅读全文
摘要:
We have an array A of non-negative integers. For every (contiguous) subarray B = [A[i], A[i+1], ..., A[j]] (with i <= j), we take the bitwise OR of al 阅读全文