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
- Host: GitHub
- URL: https://github.com/willard-yuan/cpp-code-training
- Owner: willard-yuan
- Created: 2015-04-30T17:10:18.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-11-06T15:45:13.000Z (over 3 years ago)
- Last Synced: 2025-01-12T00:26:40.836Z (5 months ago)
- Topics: cpp
- Language: HTML
- Homepage:
- Size: 14.2 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)