12 2018 档案
摘要:题目: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, w
阅读全文
摘要:题目: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician J
阅读全文
摘要:题目: Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: 分析: 每一行,每一列没有相同的数字,每一个3*3的小
阅读全文
摘要:#include <iostream> #include <map> using namespace std; int main(){ map<int,int> m; for (int i = 0; i < 10; i++){ m[i] = i*i; } map<int,int>::iterator
阅读全文