c++
008roselily
学习学习,多多关照
展开
-
Intersection of Two Arrays--求两个向量的交集
问题描述: Given two arrays, write a function to compute their intersection.Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note: Each element in the result must be unique.原创 2016-09-09 10:54:51 · 1485 阅读 · 0 评论 -
c++:顺时针打印矩阵
题目出自剑指offer 顺时针打印矩阵原创 2016-12-22 12:26:42 · 545 阅读 · 0 评论 -
Top K Frequent Elements——出现频次最多的k个数
问题描述: Given a non-empty array of integers, return the k most frequent elements.For example,原创 2016-10-07 19:26:25 · 291 阅读 · 0 评论 -
Best Time to Buy and Sell Stock——最优买卖股票问题
买卖股票问题算法原创 2016-10-07 19:20:01 · 241 阅读 · 0 评论 -
Isomorphic Strings——同构结构判断
问题描述:求两个字符串是否同构 Given two strings s and t, determine if they are isomorphic.原创 2016-10-07 19:01:11 · 350 阅读 · 0 评论 -
算法:位操作总结
https://discuss.leetcode.com/topic/50315/a-summary-how-to-use-bit-manipulation-to-solve-problems-easily-and-efficiently位操作算法总结转载 2016-09-16 21:48:00 · 366 阅读 · 0 评论 -
C++ STL初探及string、vector学习
STL(模板库)STL = Standard Template Library,标准模板库,这篇博客对STL有个初步的认识,再详细介绍里面string和vector的用法。原创 2016-08-25 19:58:35 · 496 阅读 · 0 评论 -
Counting Bits——计数
###问题描述Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.原创 2016-08-25 16:22:22 · 259 阅读 · 0 评论 -
Find the Duplicate Number--重复数字问题
Given an array nums containing n+1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the dupli原创 2016-08-24 10:17:31 · 473 阅读 · 0 评论 -
c++ 字符串反转问题
问题出自https://leetcode.com/problems/reverse-string/ 上述是一个很好的学习编程的网站Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", re原创 2016-08-23 09:56:32 · 1404 阅读 · 0 评论 -
Ugly Number(丑数)
介绍Ugly Number(丑数),对判断丑数和输出丑数序列分别进行c++编程原创 2016-08-21 13:25:05 · 612 阅读 · 0 评论