摘要:
Fizz Buzz Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of 阅读全文
摘要:
Add Binary Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 求两个二进制数的和 java代码: 阅读全文
摘要:
String 字符串常量StringBuffer 字符串变量(线程安全)StringBuilder 字符串变量(非线程安全) 简要的说, String 类型和 StringBuffer 类型的主要性能区别其实在于 String 是不可变的对象, 因此在每次对 String 类型进行改变的时候其实都等 阅读全文
摘要:
Implement Queue using Stacks Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Remo 阅读全文
摘要:
Assign Cookies Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each 阅读全文
摘要:
Construct the Rectangle For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s 阅读全文
摘要:
Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. 阅读全文
摘要:
Tenth Line shell编程 从file.txt中读数据,echo输出到控制台 while...do...done是bash中的语法结构 阅读全文
摘要:
中文屋子与图灵测试谁对? 图灵测试(The Turing test)所描述的是这样一个实验,有两间屋子,一间屋子里面是一个真实的人类,另一间屋子里面是人类所发明的机器人,屋子里面的人或者机器与屋子外的人只能通过发文字信息进行交流,如果有大多数屋子外的人分不清楚哪一间屋子里面是人,哪一间屋子里面是机器 阅读全文
摘要:
Best Time to Buy and Sell Stock II Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find 阅读全文