ninety-nine-scheme-problems


First there were Ninety-Nine Prolog Problems. Then Ninety-Nine Lisp Problems came along. At last there were Ninety-Nine Haskell Problems. Here, let's attempt to undertake the same in Scheme.

  1. (*) Find the last box of a list. S-99-01
  2. (*) Find the last but one box of a list. S-99-02
  3. (*) Find the K'th element of a list. S-99-03
  4. (*) Find the number of elements of a list. S-99-04
  5. (*) Reverse a list. S-99-05
  6. (*) Find out whether a list is a palindrome. S-99-06
  7. (**) Flatten a nested list structure. S-99-07
  8. (**) Eliminate consecutive duplicates of list elements. S-99-08
  9. (**) Pack consecutive duplicates of list elements into sublists. S-99-09
  10. (*) Run-length encoding of a list. S-99-10
  11. (*) Modified run-length encoding. S-99-11
  12. (**) Decode a run-length encoded list. S-99-12
  13. (**) Run-length encoding of a list (direct solution). S-99-13
  14. (*) Duplicate the elements of a list. S-99-14
  15. (**) Replicate the elements of a list a given number of times. S-99-15
  16. (**) Drop every N'th element from a list. S-99-16
  17. (*) Split a list into two parts; the length of the first part is given. S-99-17
  18. (**) Extract a slice from a list. S-99-18
  19. (**) Rotate a list N places to the left. S-99-19
  20. (*) Remove the K'th element from a list. S-99-20
  21. (*) Insert an element at a given position into a list. S-99-21
  22. (*) Create a list containing all integers within a given range. S-99-22
  23. (**) Extract a given number of randomly selected elements from a list. S-99-23?
  24. (*) Lotto: Draw N different random numbers from the set 1..M. S-99-24?
  25. (*) Generate a random permutation of the elements of a list. S-99-25
  26. (**) Generate the combinations of K distinct objects chosen from the N elements of a list S-99-26?
  27. (**) Group the elements of a set into disjoint subsets. S-99-27?
  28. (**) Sorting a list of lists according to length of sublists S-99-28?
  29. (**) Determine whether a given integer number is prime. S-99-31?
  30. (**) Determine the greatest common divisor of two positive integer numbers. S-99-32
  31. (*) Determine whether two positive integer numbers are coprime. S-99-33?
  32. (**) Calculate Euler's totient function phi(m). S-99-34?
  33. (**) Determine the prime factors of a given positive integer. S-99-35?
  34. (**) Determine the prime factors of a given positive integer (2). S-99-36?
  35. (**) Calculate Euler's totient function phi(m) (improved). S-99-37
  36. (*) Compare the two methods of calculating Euler's totient function. S-99-38?
  37. (*) A list of prime numbers. S-99-39?
  38. (**) Goldbach's conjecture. S-99-40?
  39. (**) A list of Goldbach compositions. S-99-41
  40. (**) Truth tables for logical expressions. S-99-46?
  41. (*) Truth tables for logical expressions (2). S-99-47?
  42. (**) Truth tables for logical expressions (3). S-99-48?
  43. (**) Gray code. S-99-49?
  44. (***) Huffman code. S-99-50?
  45. (*) Check whether a given term represents a binary tree S-99-54A?
  46. (**) Construct completely balanced binary trees S-99-55?
  47. (**) Symmetric binary trees S-99-56?
  48. (**) Binary search trees (dictionaries) S-99-57?
  49. (**) Generate-and-test paradigm S-99-58?
  50. (**) Construct height-balanced binary trees S-99-59?
  51. (**) Construct height-balanced binary trees with a given number of nodes S-99-60?
  52. (*) Count the leaves of a binary tree S-99-61?
  53. (*) Collect the leaves of a binary tree in a list S-99-61A?
  54. (*) Collect the internal nodes of a binary tree in a list S-99-62?
  55. (*) Collect the nodes at a given level in a list S-99-62B?
  56. (**) Construct a complete binary tree S-99-63
  57. (**) Layout a binary tree (1) S-99-64?
  58. (**) Layout a binary tree (2) S-99-65
  59. (***) Layout a binary tree (3) S-99-66?
  60. (**) A string representation of binary trees S-99-67?
  61. (**) Preorder and inorder sequences of binary trees S-99-68?
  62. (**) Dotstring representation of binary trees S-99-69?
  63. (**) Tree construction from a node string S-99-70?
  64. (*) Check whether a given term represents a multiway tree S-99-70B?
  65. (*) Count the nodes of a multiway tree S-99-70C?
  66. (*) Determine the internal path length of a tree S-99-71?
  67. (*) Construct the bottom-up order sequence of the tree nodes S-99-72?
  68. (**) Lisp-like tree representation S-99-73?
  69. (***) Conversions S-99-80?
  70. (**) Path from one node to another one S-99-81?
  71. (*) Cycle from a given node S-99-82?
  72. (**) Construct all spanning trees S-99-83?
  73. (**) Construct the minimal spanning tree S-99-84
  74. (**) Graph isomorphism S-99-85?
  75. (**) Node degree and graph coloration S-99-86?
  76. (**) Depth-first order graph traversal (alternative solution) S-99-87?
  77. (**) Connected components (alternative solution) S-99-88?
  78. (**) Bipartite graphs S-99-89?
  79. (**) Eight queens problem S-99-90?
  80. (**) Knight's tour S-99-91?
  81. (***) Von Koch's conjecture S-99-92?
  82. (***) An arithmetic puzzle S-99-93?
  83. (***) Generate K-regular simple graphs with N nodes S-99-94
  84. (**) English number words S-99-95?
  85. (**) Syntax checker (alternative solution with difference lists) S-99-96?
  86. (**) Sudoku S-99-97?
  87. (***) Nonograms S-99-98?
  88. (***) Crossword puzzle S-99-99?