C++
HenryZhang
这个作者很懒,什么都没留下…
展开
-
use map<key, val> in C++, solve LeetCode Anagrams 240 ms pass large test set
Anagrams Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. The basic idea is easy. From the definition of anagrams, we just n原创 2013-04-21 16:22:04 · 920 阅读 · 0 评论 -
How to use Compiler
GNU: gcc: g++: Sun: cc: 1. Memory model, -m64 flag indicate 64 bit memory model, otherwise, could not access more than 2 GB memory space cc -m64 -g mem_test.c CC:原创 2013-09-29 07:13:20 · 476 阅读 · 0 评论 -
C++ memory management
1. vector 1. 1 After vector is allocated, the memory it occupies is not freed until destructor is called, even if v.clear() is called. To explicitly deallocate this piece of memory, use this tri原创 2013-10-13 11:02:31 · 479 阅读 · 0 评论