Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] inclusive that do not appear in this array. Could you do it without extra space and in O(n) runtime?
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional elements from nums2. The number of elements initi
Given an integer n, find the closest integer (not including itself), which is a palindrome. The 'closest' is defined as absolute difference minimized between two integers. Example 1: Input: "123" Output: "121" Note: The input n is a po
题目描述 You are given an array aa consisting of nn integers. You can perform the following operations with it: Choose some positions ii and jj ( 1 \le i, j \le n, i \ne j1≤i,j≤n,i≠j ), write the value of a_i \cdot a_jai⋅aj into the jj -th cell and rem