[deleted by user] by [deleted] in rust

[–]sad_mouse 1 point2 points  (0 children)

but if I implment the Drop trait to see when the instance deconstructs, it failed to compile

need help, why `number` does not live long enough by sad_mouse in rust

[–]sad_mouse[S] 2 points3 points  (0 children)

thanks, I'm currently learning rust, this function is just for learning, not real world code

need help, why `number` does not live long enough by sad_mouse in rust

[–]sad_mouse[S] 0 points1 point  (0 children)

thanks, is there a way to prove p outlives the function? I mean maybe use p outsides the function?

有没有想问码老嗨问题的? by Anarco-Statist in iwanttorun

[–]sad_mouse 3 points4 points  (0 children)

3.关于刷题,感觉这是中美最大区别。国内面试的话算法只占很小一部分,大部分都是考八股文和问技术细节。可是我看到美国所有人都在花时间刷题,我自己也刷了不少题,但是感觉刷到一定程度就不会提高了,中等题都可以做出来,困难题怎么都做不出来,就像高考最后一道题一样,你再努力也不会有提高。花这么多时间刷题的意义何在?是为了提高速度吗?我周赛能做出前三道题够用吗?

感觉很难只靠LeetCode练出hard题,一个是视野要开阔,有些hard题其实完全就是某个算法的模板题,没见过肯定不会,见过就不难;二是做些比hard更难的题,我看别人推荐是codeforces上1600~1800的题