GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — leetcode/cpp/2553_Separate_the_Digits_in_an_Array.cpp at master · vtr44/leetcode Expand file tree/ Copy path2553_Separate_the_Digits_in_an_Array.cppMore file actions 19 lines (19 loc) · 473 Bytes / Copy path2553_Separate_the_Digits_in_an_Array.cppFile metadata and controls19 lines (19 loc) · 473 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 class Solution { public: vector<int> separateDigits(vector<int>& nums) { vector<int> answer; int n; for( int i=0; i < nums.size(); i++){ n=nums[i]; vector<int> temp; while( n>0 ){ temp.push_back(n%10); n = n / 10; } for(int j= temp.size()-1; j>=0; j--){ answer.push_back(temp[j]); } } return answer; } }; |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |