上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 定义: 顾名思义,函数指针就是指向函数的指针变量。 定义形式: 类型名(*指针变量名)(参数类型1,参数类型2,...) qsort函数: qsort函数是C语言快速排序库函数,可以对任意类型的数组进行排序。 void qsort(void *base, int nelem, unsigned in 阅读全文
posted @ 2018-03-08 20:11 宵夜在哪 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题目描述: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at 阅读全文
posted @ 2018-03-08 14:58 宵夜在哪 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a list, rotate the list to the right by k places, where k is non-negative. Example: 解题思路: 这题如果用递归的话可以只需要遍历一遍就可以得到从右数的节点。但是题目给的k会大于n,还是要得到遍 阅读全文
posted @ 2018-03-07 18:32 宵夜在哪 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 题目描述: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following s 阅读全文
posted @ 2018-03-06 16:15 宵夜在哪 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 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 阅读全文
posted @ 2018-03-05 08:33 宵夜在哪 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your 阅读全文
posted @ 2018-03-03 21:21 宵夜在哪 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 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 阅读全文
posted @ 2018-03-03 20:02 宵夜在哪 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Implement pow(x, n). Example 1: Example 2: 解题思路: pow(x,n)=pow(x,n/2)*pow(x,n/2) 代码: 阅读全文
posted @ 2018-03-02 16:21 宵夜在哪 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 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, 阅读全文
posted @ 2018-03-02 15:12 宵夜在哪 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following uni 阅读全文
posted @ 2018-03-01 23:28 宵夜在哪 阅读(81) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页