摘要:
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and num 阅读全文
摘要:
Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of 阅读全文
摘要:
Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
摘要:
思路:用map.put(cur_sum, i); 动不动就break 一开始设置end = -1是因为没找到 https://www.geeksforgeeks.org/find-subarray-with-given-sum-in-array-of-integers/ // Java progra 阅读全文
摘要:
Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that 阅读全文
摘要:
Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals to k. Example 1: Input: nums = [1,1 阅读全文
摘要:
整理公司列表-弄清楚,因为这是基础,以后也可以用地里有面经的公司(不多)先投(low key用领英)- 这个也尽量做列表中的其他公司,感兴趣的,看看是什么情况?- 这个随意 阅读全文
摘要:
小部件制造商面临对其新产品的意外高需求。他们想满足尽可能多的客户。给定可用的小部件数量和客户订单列表,制造商最多可以完全满足的订单数量是多少? 功能说明 在下面的编辑器中完成功能fillOrders。该函数必须返回一个整数,该整数表示已完成订单的最大数量。 fillOrders具有以下参数: ord 阅读全文
摘要:
Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive. There is only one duplicate number in n 阅读全文
摘要:
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文