摘要:
CLR默认所有函数参数默认传值,在C#中无论是值类型还是引用类型的参数都是如此。对于值类型是传递了一个副本。 sealed class Program { static void Main(string[] args) { Point p = new Point(); Console.WriteLi 阅读全文
摘要:
命名的重要性 Your code is for a human first and a computer second. Humans need good names. — Martin Fowler, Refactoring:Improving the Design of Existing Cod 阅读全文
摘要:
题目内容 Alice 和 Bob 用几堆石子在做游戏。几堆石子排成一行,每堆石子都对应一个得分,由数组 stoneValue 给出。 Alice 和 Bob 轮流取石子,Alice 总是先开始。在每个玩家的回合中,该玩家可以拿走剩下石子中的的前 1、2 或 3 堆石子 。比赛一直持续到所有石头都被拿 阅读全文
摘要:
问题 在linux系统中,我们都知道fork会产生一个调用进程的复制,创建出一个新的进程,那么如果父进程有多个线程会不会复制父进程的多个线程呢? 解答 使用 指令查看手册其实就能找到答案,关键的一段如下 The child process is created with a single threa 阅读全文
摘要:
题目描述 Given m sequences, each contains n non negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's 阅读全文