题目Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:a)...
分类:
其他好文 时间:
2015-03-01 13:18:01
阅读次数:
124
Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:...
分类:
其他好文 时间:
2015-03-01 06:47:02
阅读次数:
125
Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. 这道题...
分类:
移动开发 时间:
2015-02-27 13:15:17
阅读次数:
156
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2015-02-26 18:10:39
阅读次数:
137
Rotate an array of n elements to the right by k steps.
For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].
Note: Try to come up as many solutions as you c...
分类:
其他好文 时间:
2015-02-26 11:49:09
阅读次数:
104
题目Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:
Try to come up as many solutions as you can, th...
分类:
其他好文 时间:
2015-02-25 23:46:18
阅读次数:
157
图形学算法:DDA(Digital Differential Analyzer)void lineDDA(int x0, int y0, int xEnd, int yEnd){ float dx = xEnd - x0, dy = yEnd - y0, steps, k; float ...
分类:
编程语言 时间:
2015-02-25 16:55:00
阅读次数:
149
Rotate an array of n elements to the right by k steps.For example, with n=7n = 7 and k=3k = 3, the array [1,2,3,4,5,6,7][1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4][5,6,7,1,2,3,4].Note:
Try to come u...
分类:
其他好文 时间:
2015-02-24 18:44:30
阅读次数:
164
题目 爬楼梯问题,这是一道很有趣的问题。首先看题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?这...
分类:
其他好文 时间:
2015-02-20 14:08:50
阅读次数:
160
Problem Description
One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps:
First step: girls will write a long string (only c...
分类:
其他好文 时间:
2015-02-18 17:40:37
阅读次数:
660