Given a column title as appear in an Excel sheet, return its corresponding column number.
Add Binary Total Accepted: 46815 Total Submissions: 189215 My Submissions
Given numRows, generate the first numRows of Pascal's triangle.
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
Given an integer n, return the number of trailing zeroes in n!.
定义:就是在声明函数的某个参数的时候为之指定一个默认值,在调用该函数的时候如果采用该默认值,你就无须指定该参数。
如果符合某个条件要退出的话,可以用return返回,否则可以不写这句代码的,当程序执行到“}”时会自动返回。
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly o...
要点 本题考查的是整数相加的溢出处理,检查溢出有这么几种办法: – 两个正数数相加得到负数,或者两个负数相加得到正数,但某些编译器溢出或优化的方式不一样 – 对于正数,如果最大整数减去一个数小于另一个数,或者对于负数,...
用插入排序对链表排序 样例 Given 1->3->2->0->null, return 0->1->2->3->null