摘要: 函数中的数组 1. p是一个数组,是一个局部变量,说明这个函数执行完毕之后p数组中的值都被销毁了 如果单独使用p,则p表示这块数组的首地址。函数返回值按值传递是p,仅仅传递p的地址,而p数组中的内容都被销毁了。 2. 常量区的字符不能修改。 3. 正确,helloworld存在于常量区。不会随着函数 阅读全文
posted @ 2018-06-07 11:19 immjc 阅读(1754) 评论(0) 推荐(0) 编辑
摘要: Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. Example 1: Note 阅读全文
posted @ 2018-06-07 10:13 immjc 阅读(120) 评论(0) 推荐(0) 编辑
摘要: We are to write the letters of a given string S, from left to right into lines. Each line has maximum width 100 units, and if writing a letter would c 阅读全文
posted @ 2018-06-07 09:43 immjc 阅读(140) 评论(0) 推荐(0) 编辑
摘要: International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a"maps to ".-", "b" maps 阅读全文
posted @ 2018-06-07 09:29 immjc 阅读(124) 评论(0) 推荐(0) 编辑
摘要: A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com 阅读全文
posted @ 2018-06-07 09:15 immjc 阅读(162) 评论(0) 推荐(0) 编辑