![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 59
来自星星的松子
一个有理想的逗比。
展开
-
C/C++/Java/OC在终端下编译和运行(持续更新...)
我们习惯了在各种IDE或者文本编辑器中进行代码编写,而一旦我们失去了IDE之后很多人就不知道怎么编译和运行我们的代码鸟。今天我们就来了解常用的几种编程语言如何在终端的下进行编译和运行。然后我们再简单的使用make命令来实现自动化编译和运行等操作。原创 2016-02-09 15:27:16 · 495 阅读 · 0 评论 -
LeetCode - Reverse String
QuestionLink : https://leetcode.com/problems/reverse-string/Write a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.原创 2016-04-22 23:11:23 · 422 阅读 · 0 评论 -
LeetCode - Ugly Number
QuestionLink : Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.原创 2016-04-21 11:43:17 · 321 阅读 · 0 评论 -
LeetCode - Power of Three
Given an integer, write a function to determine if it is a power of three.原创 2016-04-21 11:15:29 · 315 阅读 · 0 评论 -
LeetCode - Nim Game
QuestionLink : https://leetcode.com/problems/nim-game/You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 s原创 2016-04-19 22:52:01 · 660 阅读 · 0 评论 -
LeetCode - Power of Four
QuestionLink : https://leetcode.com/problems/power-of-four/Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example: Given num = 16, return true. Given num原创 2016-04-19 22:21:39 · 371 阅读 · 0 评论 -
LeetCode - Majority Element
QuestionLink : https://leetcode.com/problems/majority-element/Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.原创 2016-04-16 23:45:52 · 263 阅读 · 0 评论 -
LeetCode - ZigZag Conversion
QuestionLink : https://leetcode.com/problems/zigzag-conversion/The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this...原创 2016-04-16 22:51:39 · 258 阅读 · 0 评论 -
LeetCode - Word Pattern
QuestionLink : https://leetcode.com/problems/word-pattern/Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a原创 2016-04-28 23:46:46 · 362 阅读 · 0 评论 -
LeetCode - Binary Tree Level Order Traversal
QuestionGiven a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).原创 2016-04-14 20:42:35 · 262 阅读 · 0 评论 -
LeetCode - Delete Node in a Linked List
QuestionLink : https://leetcode.com/problems/delete-node-in-a-linked-list/Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.原创 2016-04-14 20:13:29 · 264 阅读 · 0 评论 -
LeetCode - Two Sum
QuestionLink : https://leetcode.com/problems/two-sum/ Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have原创 2016-04-11 17:38:58 · 229 阅读 · 0 评论 -
LeetCode - Add Two Numbers
QuestionLink:https://leetcode.com/problems/add-two-numbers/ You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain原创 2016-04-11 17:45:13 · 309 阅读 · 0 评论 -
LeetCode - Add Digits
QuestionLink:https://leetcode.com/problems/add-digits/ Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.原创 2016-04-11 18:58:38 · 266 阅读 · 0 评论 -
LeetCode - Add Binary
QuestionLink:https://leetcode.com/problems/add-binary/ Given two binary strings, return their sum (also a binary string).原创 2016-04-11 19:52:59 · 337 阅读 · 0 评论 -
LeetCode - Balanced Binary Tree
QuestionGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never di原创 2016-04-13 14:34:33 · 253 阅读 · 0 评论 -
LeetCode - Best Time to Buy and Sell Stock
QuestionLink : https://leetcode.com/problems/best-time-to-buy-and-sell-stock/Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complet原创 2016-04-13 15:31:36 · 246 阅读 · 0 评论 -
C++/Objective-C内存管理对比学习
C++内存管理内存分为五个区:堆、栈、自由存储区、全局/静态存储区和常量存储区。栈。存储函数中局部变量,函数结束时会自动释放。堆。由new分配的内存块,由应用程序控制它的回收(需要手动回收),即一个new应该对应一个delete。如果程序员没释放,则程序结束系统会自动回收。自由存储区。使用malloc分配的内存块,和堆类似,用free来释放。全局/静态存储区。存放全局变量和静态变量。常量存原创 2016-02-27 22:38:02 · 840 阅读 · 0 评论 -
Google protocol buffer 使用和原理浅析 And 进阶使用方式之PbCodec
Google Protocol Buffer又简称Protobuf,它是一种很高效的结构化数据存储格式,一般用于结构化数据的串行化,简单说就是我们常说的数据序列化。这种序列化的协议非常轻便高效,而且是跨平台的,目前已支持多种主流语言(3.0版本支持C++, JAVA, C#, OC, GO, PYTHON等)。原创 2016-07-03 17:04:12 · 10412 阅读 · 0 评论