01 2016 档案
摘要:1.最简单的方法是使用tac [root ~]$ seq 5 |tac 5 4 3 2 1 2.使用tr和awk。 tr把换行符替换成自定义的分隔符,awk分解替换后的字符串,并逆序输出 [root ~]$ seq 5 | tr '\n' ' ' | awk '{for(i=NF;i>0;i--) 
        阅读全文
            
摘要:chinaunix 上看到这么一题:echo 12345678.12|sed ****期望达到效果:12,345,678.12我的解法是先把字符串反转,然后根据‘.’分割,分割完成后对$2部分再进行一次字符串分割,并将结果保存在数组中,遍历数组,每循环三次输出一个‘,’[appadmin@acacb...
        阅读全文
            
摘要:Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assum...
        阅读全文
            
摘要:The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at the Users tabl...
        阅读全文
            
摘要:The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id.+----+-------+--------+------------...
        阅读全文
            
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号