![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
eastlife1212
这个作者很懒,什么都没留下…
展开
-
C++, Python, Java string的操作对比
C++:initialize:string str1(5, 'c');string str2("Now is the time...");string str3(str2, 11, 4);cout << str1 << endl; //ccccccout << str2 << endl; //Now is the time.....原创 2018-10-30 10:44:25 · 134 阅读 · 0 评论 -
Priority Queue and Heap
Time complexitytopmax/topmin O(1)push O(logn)Pop O(logn) Remove (Java)Priority Queue: O(n) (traverse O(n) + swap O(1) + sift up/down O(logn))Hash Heap: O(logn) (traverse O(1) + swap O(1)...原创 2018-11-12 15:30:48 · 244 阅读 · 0 评论 -
Java 字符串操作
Regular Expressions:\\s 匹配任何不可见字符,包括空格、制表符、换页符等等。等价于[ \f\n\r\t\v]。\\S 匹配任何可见字符。等价于[^ \f\n\r\t\v]。\\w 匹配包括下划线的任何单词字符。类似但不等价于“[A-Za-z0-9_]”,这里的"单词"字符使用Unicode字符集。\\W 匹配任何非单词字符。等价于“[^A-Za-z0-9_]”...原创 2019-01-02 21:54:47 · 142 阅读 · 0 评论