An open API service indexing awesome lists of open source software.

https://github.com/willard-yuan/cpp-code-training

coding
https://github.com/willard-yuan/cpp-code-training

cpp

Last synced: 3 months ago
JSON representation

coding

Awesome Lists containing this project

README

        

## 代码清单

1.问题描述: 计算阶乘结果有多少个0

1). 暴力解法。直接计算阶乘结果,然后统计0的个数,这种暴力解法在计算阶乘的结果极易溢出。
2). 统计因子法。统计阶乘中每个数公因子5有多少个。
代码详见[countFactorialZeros.cpp](https://github.com/willard-yuan/coding-training/blob/master/coding-interviews/countFactorialZeros.cpp)

2.问题描述:char *commonStrFind(const char *str, const char *substr),找出str2字符串在str1字符串中第一次出现的位置,返回这个位置的指针
代码[commonStrFind.cpp](https://github.com/willard-yuan/coding-training/blob/master/coding-freely/commonStrFind.cpp)