题目 class Solution { public: int ans[10005]; vector<int> sequentialDigits(int low, int high) { int x = 1; int pos=0; int tag=1; for(int i=1;i<=9;i++) { x=fun2(x); tag*=10; int xx=x; for(int j=1;j<=9-i;j++) { ans[pos++]=xx; xx=fun(xx,tag); } } v…
Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected element by 1 or decrementing a selected element by 1. You may assume the array's length is at most 10…