V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  kuangwinnie  ›  全部回复第 8 页 / 共 19 页
回复总数  366
1 ... 4  5  6  7  8  9  10  11  12  13 ... 19  
2021-02-05 12:08:12 +08:00
回复了 a437008694 创建的主题 程序员 程序员与医生
这取决于你想要职业的流动性还是职业的成长性了
码农的职业流动性远比医生高得多
下次建议大家大范围民主投票选 CEO,选 CTO
2020-11-03 00:21:56 +08:00
回复了 Bechbaliq 创建的主题 程序员 各位都是怎么学会 Hash Table 的
画个图就明白了
2020-10-29 00:28:12 +08:00
回复了 gdw1986 创建的主题 Python 书接上文,关于算法
刷题就行了
500 题下来什么都通了,再不通的话也能看得懂别人在写啥了
2020-10-28 03:29:02 +08:00
回复了 gdw1986 创建的主题 Python 估计面试没通过,唉
@oahebky 不是 2sums
2020-10-25 09:02:32 +08:00
回复了 Luoheqp 创建的主题 广州 新手练习 , 有练车的好去处么 ?
驾校吧
大学城有摄像头
而且一不小心窜出来个大学生 /狗
慌不择路
2020-10-22 13:53:04 +08:00
回复了 volvo007 创建的主题 Python 请教一个数组取特定索引的问题
@volvo007 懂了,codepad,我还以为回复里面可以跟主贴一样插代码
2020-10-22 13:52:19 +08:00
回复了 volvo007 创建的主题 Python 请教一个数组取特定索引的问题
到底怎么插代码啊
2020-10-22 13:52:09 +08:00
回复了 volvo007 创建的主题 Python 请教一个数组取特定索引的问题
@volvo007
你需要知道每个数字在这个数组中前后的信息( like,这个数字所在的段是否长度为 1 以上)
你要优化的话我觉得可以用二分来优化,每次找可以从 n 提高到 logn
然后变成 klogn ( k 为段的数目)

变成树状结构无非就是让你更好的二分
2020-10-22 13:47:47 +08:00
回复了 volvo007 创建的主题 Python 请教一个数组取特定索引的问题
服了 到底怎么插代码啊= =
2020-10-22 13:47:15 +08:00
回复了 volvo007 创建的主题 Python 请教一个数组取特定索引的问题
```
def getIndex(arr):
memo = [0] * len(arr)
left, right = 0, 0
while left < len(memo):
# while right < len(memo):
# if memo[right] == 1:
# right += 1
while right < len(arr) and arr[right] == 1:
right += 1
if right - left > 1:
memo[right - 1] = (right - left)
if left == right:
right += 1
left = right

res = []
for idx in range(len(arr) - 1, -1, -1):
if memo[idx] != 0:
res.append([idx -memo[idx] , idx])
res.reverse()
return res
```
2020-10-22 13:45:07 +08:00
回复了 volvo007 创建的主题 Python 请教一个数组取特定索引的问题
```python
def getIndex(arr):
memo = [0] * len(arr)
left, right = 0, 0
while left < len(memo):
# while right < len(memo):
# if memo[right] == 1:
# right += 1
while right < len(arr) and arr[right] == 1:
right += 1
if right - left > 1:
memo[right - 1] = (right - left)
if left == right:
right += 1
left = right

res = []
for idx in range(len(arr) - 1, -1, -1):
if memo[idx] != 0:
res.append([idx -memo[idx] , idx])
res.reverse()
return res
```
2020-10-22 13:43:41 +08:00
回复了 volvo007 创建的主题 Python 请教一个数组取特定索引的问题
```python
def getIndex(arr):
memo = [0] * len(arr)
left, right = 0, 0
while left < len(memo):
# while right < len(memo):
# if memo[right] == 1:
# right += 1
while right < len(arr) and arr[right] == 1:
right += 1
if right - left > 1:
memo[right - 1] = (right - left)
if left == right:
right += 1
left = right

res = []
for idx in range(len(arr) - 1, -1, -1):
if memo[idx] != 0:
res.append([idx -memo[idx] , idx])
res.reverse()
return res

```
不如买个二手便宜笔记本了。。。
2020-10-21 05:08:38 +08:00
回复了 JellyBeanX 创建的主题 职场话题 卖个惨,找 V 友们诉诉苦
哥们,会好起来的。
2020-10-10 00:28:36 +08:00
回复了 raaaaaar 创建的主题 程序员 想要考虑所有情况而焦虑该怎么办?
@user8341 陷入细节之后甚至会发现一些细节本身就是自相矛盾的。。。
总结出来几个套路然后面试之前学学细节就行了。。。我是这么觉得的
2020-10-09 23:20:43 +08:00
回复了 raaaaaar 创建的主题 程序员 想要考虑所有情况而焦虑该怎么办?
感觉是迷失在细节里了
斗胆问一下楼主是不是没有学过高等数学以后的数学了?
@AX5N 原帖到底说的是什么意思啊,你是咋看出来你说的这个结论的?
2020-10-09 23:13:59 +08:00
回复了 levineet 创建的主题 Apple 14 日凌晨 Apple Event 剧透出来了
@marcong95 是啊,之前有个图就是 iPhone 内嵌了磁吸的铁片
2020-10-09 05:26:06 +08:00
回复了 zqx 创建的主题 程序员 从互联网前端到国企全干的见闻
@Sparetire 看你俩对话实在是太好笑了哈哈哈哈哈
1 ... 4  5  6  7  8  9  10  11  12  13 ... 19  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2598 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms · UTC 04:28 · PVG 12:28 · LAX 21:28 · JFK 00:28
Developed with CodeLauncher
♥ Do have faith in what you're doing.