<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[chmodexplorer的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/chmodexplorer</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; chmodexplorer]]></copyright><item><title><![CDATA[关于“simplicity”的看法 -- 读《Masterminds of Programming》有感]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/50573044</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/50573044</guid><author>chmodexplorer</author><pubDate>Sun, 24 Jan 2016 12:11:18 +0800</pubDate><description><![CDATA[任何编程语言，都是解决实际问题的工具。我想，没有那个语言的创始人只希望他的语言是同行的热点话题，却很少有程序员去使用它。所以我想，从解决实际问题的角度出发，去看待语言的“简单”，我们能得到很多启示。


那么我对“简单”的看法是什么呢？我一一列举：
1、简单不是一个独立概念，它必然是相对复杂而言的。当我们定义了简单，我们也就定义了复杂。反过来也如此，定义了复杂也就定义了简单；
2、《Co]]></description><category></category></item><item><title><![CDATA[Presorting]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/50506476</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/50506476</guid><author>chmodexplorer</author><pubDate>Tue, 12 Jan 2016 20:25:09 +0800</pubDate><description><![CDATA[Exercises 6.1




1
def min_diff(L):
    n = len(L)
    if n > 1:
        L = sorted(L)
        md = L[1] - L[0]
        i = 2
        while i < n:
            d = L[i] - L[i - 1]
            if]]></description><category></category></item><item><title><![CDATA[The Maximum-Subarray Problem]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/50414596</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/50414596</guid><author>chmodexplorer</author><pubDate>Sun, 27 Dec 2015 23:18:09 +0800</pubDate><description><![CDATA[Suppose that you have been offered the opportunity to invest in the Volatile Chemical Corporation. Like the chemicals the company produces, the stock price of the Volatile Chemical Corporation is rath]]></description><category></category></item><item><title><![CDATA[Use python to implement Dijkstra's algorithm]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/50405227</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/50405227</guid><author>chmodexplorer</author><pubDate>Fri, 25 Dec 2015 20:56:40 +0800</pubDate><description><![CDATA[The implementation of the Dijkstra's Algorithm:
def dijkstra(g, s):
    from priority_queue import PriorityQueue, less_than

    result = []
    class Record:
        def __init__(self, v, parent = -]]></description><category></category></item><item><title><![CDATA[必须认真学习的算法书]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/44657769</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/44657769</guid><author>chmodexplorer</author><pubDate>Thu, 26 Mar 2015 22:44:30 +0800</pubDate><description><![CDATA[必须认真学习的算法书]]></description><category></category></item><item><title><![CDATA[Two ways to solve the "Longest common subsequence" problem]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/43969623</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/43969623</guid><author>chmodexplorer</author><pubDate>Fri, 27 Feb 2015 16:53:26 +0800</pubDate><description><![CDATA[namespace v1
    {
        template 
        std::basic_string lcs(const CHAR * s1, const CHAR * s2)
        {
            typedef std::basic_string String;
            String ret;
            int m =]]></description><category></category></item><item><title><![CDATA[Implement most-significant-digit-first string sort]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/42919723</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/42919723</guid><author>chmodexplorer</author><pubDate>Tue, 20 Jan 2015 16:37:21 +0800</pubDate><description><![CDATA[namespace pratique
{
    namespace details
    {
        const size_t CUTOFF = 15;

        int compare(const char * s1, const char * s2, size_t d)
        {
            int ret = 0;
            s1 +=]]></description><category></category></item><item><title><![CDATA[How to implement segment tree]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/42836819</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/42836819</guid><author>chmodexplorer</author><pubDate>Sun, 18 Jan 2015 17:53:53 +0800</pubDate><description><![CDATA[template 
    class segment_tree
    {
        struct record
        {
            int left;
            int right;
            T value;
            T sum;
        };
        int                 m_siz]]></description><category></category></item><item><title><![CDATA[Three ways to solve the "Longest Palindromic Substring" problem]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/42593519</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/42593519</guid><author>chmodexplorer</author><pubDate>Sun, 11 Jan 2015 00:12:05 +0800</pubDate><description><![CDATA[namespace v1
    {
        namespace details
        {
            inline bool is_palindromic(int i, int j, std::vector>> & cache)
            {
                std::pair deux = cache[i][j];]]></description><category></category></item><item><title><![CDATA[How to solve the Candy problem?]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/42555595</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/42555595</guid><author>chmodexplorer</author><pubDate>Fri, 09 Jan 2015 15:34:04 +0800</pubDate><description><![CDATA[The problem is:

There are N children standing in a line. Each child is assigned a rating value.

You are giving candies to these children subjected to the following requirements:

Each child mu]]></description><category></category></item><item><title><![CDATA[Give an O(log m + log n) algorithm to find the kth element in two sorted arrays]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/42542943</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/42542943</guid><author>chmodexplorer</author><pubDate>Fri, 09 Jan 2015 01:59:10 +0800</pubDate><description><![CDATA[Give an O(log (m+n)) algorithm to find the kth element in two sorted arrays A and B of size m and n respectively as if they are merged.

namespace details
{
    template 
    I kth_element( I b1, I]]></description><category></category></item><item><title><![CDATA[Use Python to implement Trie]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/40749021</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/40749021</guid><author>chmodexplorer</author><pubDate>Mon, 03 Nov 2014 22:01:23 +0800</pubDate><description><![CDATA[class TrieKeyIterator:
    def __init__(self, root):
        self.root = root
        self.root_list = {'' : self.root}
        self.stack = [(iter(self.root_list.items()), '')]

    def __next__(self]]></description><category></category></item><item><title><![CDATA[What is the probability that you hire exactly twice?]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/38979351</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/38979351</guid><author>chmodexplorer</author><pubDate>Mon, 01 Sep 2014 14:30:39 +0800</pubDate><description><![CDATA[In HIRE-ASSISTANT, assuming that the candidates are presented in a random order,]]></description><category></category></item><item><title><![CDATA[Efficiently factor N when e and d become known to you.]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/38794135</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/38794135</guid><author>chmodexplorer</author><pubDate>Sun, 24 Aug 2014 10:26:26 +0800</pubDate><description><![CDATA[The problem is:
In the RSA cryptosystem, Alice’s public key (N, e) is available to everyone. Suppose that her private key d is compromised and becomes known to Eve. Show that if e = 3 (a common choic]]></description><category></category></item><item><title><![CDATA[Implement regular expressions]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/29406633</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/29406633</guid><author>chmodexplorer</author><pubDate>Sun, 08 Jun 2014 21:42:47 +0800</pubDate><description><![CDATA[namespace details
    {
        void dfs_visit( size_t u, std::vector> & g, std::vector & visited )
        {
            visited[ u ] = true;
            for ( auto i = g[ u ].begin(), e = g[ u ] .en]]></description><category></category></item><item><title><![CDATA[Recursion problems]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/24903023</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/24903023</guid><author>chmodexplorer</author><pubDate>Sat, 03 May 2014 09:08:57 +0800</pubDate><description><![CDATA[Problem : print out all of the permutations of n elements:]]></description><category></category></item><item><title><![CDATA[Implement the avl tree, rbtree without the two fields: parent pointer and balance/color]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/19166473</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/19166473</guid><author>chmodexplorer</author><pubDate>Thu, 13 Feb 2014 16:54:49 +0800</pubDate><description><![CDATA[#ifndef GYM_RED_BLACK_TREE_H_6D4EBDB0_5B18_4FC1_A34A_CBBF36FE95E4
#define GYM_RED_BLACK_TREE_H_6D4EBDB0_5B18_4FC1_A34A_CBBF36FE95E4

#include 
#include 
#include 
#include 
#include 
#include 
#includ]]></description><category></category></item><item><title><![CDATA[Give an O(lg n)-time algorithm to find the median of all 2n elements in arrays X and Y.]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/10400153</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/10400153</guid><author>chmodexplorer</author><pubDate>Tue, 27 Aug 2013 16:08:05 +0800</pubDate><description><![CDATA[Let X[1 ‥ 
n] and Y[1 ‥ 
n] be two arrays, each containing n numbers already in sorted order. Give an
O(lg n)-time algorithm to find the median of all 2n elements in arrays
X and Y.
    template]]></description><category></category></item><item><title><![CDATA[Implement the quicksort algorithm in as many different ways as possible]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/8131666</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/8131666</guid><author>chmodexplorer</author><pubDate>Wed, 31 Oct 2012 11:10:16 +0800</pubDate><description><![CDATA[#ifndef GYM_ALGORITHM_QUICK_SORT_H_6D4EBDB0_5B18_4FC1_A34A_CBBF36FE95E4
#define GYM_ALGORITHM_QUICK_SORT_H_6D4EBDB0_5B18_4FC1_A34A_CBBF36FE95E4

#include 
#include "sort_common.h"
#include "inser]]></description><category></category></item><item><title><![CDATA[If only one side of processes crash, the other side of processes do not hang.]]></title><link>https://blog.youkuaiyun.com/chmodexplorer/article/details/7912673</link><guid>https://blog.youkuaiyun.com/chmodexplorer/article/details/7912673</guid><author>chmodexplorer</author><pubDate>Mon, 27 Aug 2012 16:19:14 +0800</pubDate><description><![CDATA[Use the shared memory to implement a queue, and producers can use it to transfer data to consumers. If only one side of processes crash, the other side of processes do not hang.
 
The interface is:]]></description><category></category></item></channel></rss>