![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构:数组
fxf1012
这个作者很懒,什么都没留下…
展开
-
《剑指Offer》面试题4:替换空格
《剑指Offer》 P44面试题4:替换空格题目:原创 2015-04-23 21:49:42 · 400 阅读 · 0 评论 -
LeetCode 80 Remove Duplicates from Sorted Array II
LeetCode80 Remove Duplicates from Sorted Array II题目Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted array nums = [1,1,1,2,2,3],Your function s原创 2015-05-08 16:15:15 · 305 阅读 · 0 评论 -
LeetCode 26 Remove Duplicates from Sorted Array
LeetCode26 Remove Duplicates from Sorted Array题目Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for an原创 2015-05-07 21:19:12 · 272 阅读 · 0 评论 -
《CTCI》1.8 调用一次isSubstring判断旋转字符串
《CITI》P1161 数组与字符串题目:1.8 Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, si and s2, write code to check Ifs2 is a rotation of si using only o原创 2015-04-24 22:23:49 · 548 阅读 · 0 评论 -
《CTCI》1.7 二维数组的含0元素所在行列清零
《CITI》P1151 数组与字符串题目:1.7 Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column are set to 0.原创 2015-04-24 22:20:20 · 852 阅读 · 0 评论 -
《CTCI》1.6 旋转二维数组
《CITI》P1141 数组与字符串题目:1.6 Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place?原创 2015-04-24 22:18:42 · 217 阅读 · 0 评论 -
《剑指Offer》面试题14:调整数组顺序使奇数位于偶数前面
《剑指Offer》 P102面试题14:调整数组顺序使奇数位于偶数前面题目:原创 2015-04-24 09:51:39 · 380 阅读 · 0 评论 -
《剑指Offer》面试题12:打印1到最大的n位数
《剑指Offer》 P94面试题12:打印1到最大的n位数题目:原创 2015-04-24 09:44:51 · 861 阅读 · 0 评论 -
《剑指Offer》面试题20:顺时针打印矩阵
《剑指Offer》 P127面试题20:顺时针打印矩阵题目:原创 2015-04-24 10:11:57 · 803 阅读 · 0 评论 -
《剑指Offer》面试题8:旋转数组的最小数字
《剑指Offer》 P66面试题8:旋转数组的最小数字题目:原创 2015-04-23 22:02:15 · 596 阅读 · 0 评论 -
《剑指Offer》面试题3:二维数组中的查找
《剑指Offer》 P38面试题3:二维数组中的查找题目: 在一个二维数组中,每一行都按照从左到右递增的顺序排列,每一列都按照从上到下递增的顺序排列。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。原创 2015-04-23 15:19:54 · 381 阅读 · 0 评论 -
《剑指Offer》面试题33:把数组排成最小的数
//面试题33:把数组排成最小的数#include <iostream>#include <vector>#include <string>#include <sstream>#include <Windows.h>using namespace std;const int prec = numeric_limits<long double>::digits10;//模板函数:类型转换原创 2015-05-15 15:39:56 · 1004 阅读 · 0 评论