Ninety-Nine Scheme Problems
tangclfs
喜欢安静、喜欢思考,喜欢自由自在、喜欢没有烦恼...
展开
-
P17 (*) Split a list into two parts; the length of the first part is given.
Split a list into two parts; the length of the first part is given.原创 2016-01-16 10:04:19 · 286 阅读 · 0 评论 -
P08 (**) 消除连续重复的列表元素
Eliminate consecutive duplicates of list elements.原创 2015-12-21 21:58:40 · 376 阅读 · 0 评论 -
P04(*) 获取列表的长度【重补】
Find the number of elements of a list.原创 2015-12-16 21:42:07 · 388 阅读 · 0 评论 -
P09 (**) 把连续重复的列表元素打包为子列表
Pack consecutive duplicates of list elements into sublists.原创 2015-12-24 21:54:20 · 333 阅读 · 0 评论 -
P12 (**) 解码游程编码过的列表
Decode a run-length encoded list.原创 2015-12-30 22:43:02 · 462 阅读 · 0 评论 -
P10 (*) 列表的游程编码
Run-length encoding of a list.原创 2015-12-25 22:05:13 · 361 阅读 · 0 评论 -
P26 (**) Generate the combinations of K distinct objects chosen from the N elements of a list.
Generate the combinations of K distinct objects chosen from the N elements of a list原创 2016-01-31 10:42:01 · 375 阅读 · 0 评论 -
P13 (**) 列表的游程编码(直接编码)
Run-length encoding of a list (direct solution).原创 2016-01-10 22:02:33 · 587 阅读 · 0 评论 -
P27 (**) Group the elements of a set into disjoint subsets.
Group the elements of a set into disjoint subsets.原创 2016-01-31 19:03:59 · 436 阅读 · 0 评论 -
P14 (*) Duplicate the elements of a list.
Duplicate the elements of a list.原创 2016-01-13 22:36:36 · 278 阅读 · 0 评论 -
P15 (**) Replicate the elements of a list a given number of times.
Replicate the elements of a list a given number of times.原创 2016-01-14 23:13:24 · 251 阅读 · 0 评论 -
P28 (**) Sorting a list of lists according to length of sublists.
Sorting a list of lists according to length of sublists原创 2016-02-02 20:06:08 · 285 阅读 · 0 评论 -
P29 (**) Compose arbitrarily many procedures of one argument.
Compose arbitrarily many procedures of one argument.原创 2016-02-02 21:05:29 · 372 阅读 · 0 评论 -
P31 (**) Determine whether a given integer number is prime.
Determine whether a given integer number is prime.原创 2016-03-04 22:10:16 · 330 阅读 · 0 评论 -
P30 (*) Transposing a Matrix
Transposing a Matrix原创 2016-02-20 09:28:53 · 280 阅读 · 0 评论 -
P32 (**) Determine the greatest common divisor of two positive integer numbers.
Determine the greatest common divisor of two positive integer numbers原创 2016-03-06 21:44:33 · 354 阅读 · 0 评论 -
P02 (*) 获取列表的倒数第二个元素
Find the last but one element of a list.原创 2015-12-12 21:53:14 · 4625 阅读 · 0 评论 -
P01 (*) 获取列表最后一个元素【重补】
Find the last element of a list.原创 2015-12-15 22:40:25 · 1288 阅读 · 0 评论 -
P18 (**) Extract a slice from a list.
Extract a slice from a list.原创 2016-01-17 11:59:16 · 227 阅读 · 0 评论 -
P11 (*) 游程编码改
Modified run-length encoding.原创 2015-12-27 10:42:39 · 275 阅读 · 0 评论 -
P19 (**) Rotate a list N places to the left.
Rotate a list N places to the left.原创 2016-01-18 21:21:18 · 277 阅读 · 0 评论 -
P20 (*) Remove the K'th element from a list.
Remove the K'th element from a list.原创 2016-01-19 20:01:27 · 249 阅读 · 0 评论 -
P16 (**) Drop every N'th element from a list.
Drop every N'th element from a list.原创 2016-01-15 21:38:18 · 274 阅读 · 0 评论 -
P21 (*) Insert an element at a given position into a list.
Insert an element at a given position into a list.原创 2016-01-20 21:04:21 · 336 阅读 · 0 评论 -
Ninety-Nine Scheme Problems--引
Ninety-Nine Scheme Problems的介绍原创 2015-10-10 23:09:04 · 441 阅读 · 0 评论 -
P03 (*) 获取列表的第K个元素
Find the K'th element of a list.原创 2015-12-13 11:46:26 · 488 阅读 · 0 评论 -
P06 (*) 判断一个列表是否是回文列表
Find out whether a list is a palindrome.原创 2015-12-18 22:32:19 · 699 阅读 · 0 评论 -
P05 (*) 反向列表中元素
Reverse a list.原创 2015-12-17 22:17:11 · 450 阅读 · 0 评论 -
P22 (*) Create a list containing all integers within a given range.
Create a list containing all integers within a given range.原创 2016-01-21 21:24:53 · 238 阅读 · 0 评论 -
P23 (**) Extract a given number of randomly selected elements from a list.
Extract a given number of randomly selected elements from a list.原创 2016-01-22 21:46:20 · 306 阅读 · 0 评论 -
P24 (*) Lotto: Draw N different random numbers from the set 1..M.
Lotto: Draw N different random numbers from the set 1..M.原创 2016-01-23 19:36:32 · 296 阅读 · 0 评论 -
P07 (**) 铺开(flatten) 嵌套列表
Flatten a nested list structure.原创 2015-12-20 01:23:15 · 443 阅读 · 0 评论 -
P25 (*) Generate a random permutation of the elements of a list.
Generate a random permutation of the elements of a list.原创 2016-01-24 13:49:49 · 258 阅读 · 0 评论 -
P33 (*) Determine whether two positive integer numbers are coprime.
Determine whether two positive integer numbers are coprime原创 2016-03-07 20:05:43 · 267 阅读 · 0 评论