11 2015 档案

自对齐(self-aligned)
摘要:C语言是自对齐的,32位以4字节对齐,64位以8字节对齐(1字节=8 bits)自对齐的好处:在一条指令内完成数据的取或者存的操作,使得内存访问更快;否则,如果一个变量跨机器字存储,那么要做两次或更多次的访问(先取存在前一个机器字的内容,再取存在后一个机器字的内容)。对齐要求:字符可以起始于任何字节... 阅读全文

posted @ 2015-11-16 16:22 joannae 阅读(428) 评论(0) 推荐(0)

43. Multiply Strings (String)
摘要:Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-neg 阅读全文

posted @ 2015-11-02 15:45 joannae 阅读(152) 评论(0) 推荐(0)

67. Add Binary
摘要:Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".class Solution {public: string addBinary(... 阅读全文

posted @ 2015-11-02 14:58 joannae 阅读(114) 评论(0) 推荐(0)

66. Plus One
摘要:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文

posted @ 2015-11-02 14:55 joannae 阅读(181) 评论(0) 推荐(0)

65. Valid Number
摘要:Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the 阅读全文

posted @ 2015-11-01 20:47 joannae 阅读(195) 评论(0) 推荐(0)

导航