CodeCraft
  • 首页
  • 归档
  • 标签
  • 关于
  • English

[leetcode 315]Count of Smaller Numbers After Self 原创解法

题目概述原题链接 You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i].
2016-12-26
#leetcode #算法 #python

使用pandas.read_csv()读取csv文件

问题以下Python代码实现对Excel转存的csv文件进行读取。 12import pandas as pddf = pd.read_csv(file_path + file_name + ".csv", encoding="gbk")
2016-12-22
#python #技巧

R和Python里得到传入参数的变量名

问题同事写R程序的时候,问我能不能获取一个变量的name, 我说这个好办啊,在R里可以这样写,用quote() > a <- 1 > quote(a) a 不过我把问题想简单了,他实际需要的是要获得传入 参数的name。例如定义一个函数foo(c), 给它传入参数a,我能够在函数 内部知道传入参数的名字a。
2016-12-21
#python #R

[leetcode 282]Expression Add Operators 原创解法

题目概述原题链接 Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators ( not unary) +, -, or * between the digits so they evaluate to the target va
2016-12-19
#leetcode #算法 #python

[leetcode 224 & 227]Basic Calculator I & II 原创解法

题目概述224原题链接 227原题链接 Implement a basic calculator to evaluate a simple expression string. 这两道题可以使用一种通用的解法来解。所以就放在一起了。 "1 + 1" = 2 " 2-1 + 2 " = 3 "(1+(4+5+2)-3)+(6+8)" =
2016-10-24
#leetcode #算法 #python

[leetcode 200]Number of Islands 原创解法

题目概述原题链接 Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or
2016-09-27
#leetcode #算法 #python
1…345

搜索

Hexo Fluid