摘要:
题目: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3, You should return the fol 阅读全文
摘要:
题目: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: [ 阅读全文
摘要:
题目: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ B 阅读全文
摘要:
题目: Description: Count the number of prime numbers less than a non-negative number, n. cpp: class Solution { public: int countPrimes(int n) { bool isP 阅读全文