码迷,mamicode.com
首页 > 其他好文 > 详细

常用英语词汇

时间:2014-11-10 21:33:26      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:io   ar   sp   for   strong   on   art   bs   ad   

常用英语词汇

 

1. spiral order 螺旋形顺序

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.

For example,
Given n = 3,

You should return the following matrix:

[
 [ 1, 2, 3 ],
 [ 8, 9, 4 ],
 [ 7, 6, 5 ]
]


2. Permutation "排序"

The permutation is even if the number of inversions it contains is even.

如果一个排列中含有的反序的个数是偶数,则称它为偶排列。

 

3. Palindrome/Palindromic 回文的

 

4. anagram 重组字

dormitory = dirty room就是一对 anagrams,或者说"dirty room" 是"dormitory"的anagram 

 

5. concatenation 字符串连接

You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters.

For example, given:
S"barfoothefoobarman"
L["foo", "bar"]

You should return the indices: [0,9].
(order does not matter).

 

6. Interleaving 交错;交叉

例 

Given s1s2s3, find whether s3 is formed by the interleaving of s1 and s2.

For example,
Given:
s1 = "aabcc",
s2 = "dbbca",

When s3 = "aadbbcbcac", return true.
When s3 = "aadbbbaccc", return false.

 

常用英语词汇

标签:io   ar   sp   for   strong   on   art   bs   ad   

原文地址:http://www.cnblogs.com/felixfang/p/3674648.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!