Giter VIP home page Giter VIP logo

99-clojure-problems's Introduction

lisp-problems

Attempt at solving 99 Lisp problems in Clojure.

Lists: Problems 1-28

  • P01 (*) Find the last box of a list.
  • p02 (*) Find the last but one box of a list.
  • P03 (*) Find the K'th element of a list.
  • P04 (*) Find the number of elements of a list.
  • P05 (*) Reverse a list.
  • P06 (*) Find out whether a list is a palindrome.
  • P07 (**) Flatten a nested list structure.
  • P08 (**) Eliminate consecutive duplicates of list elements.
  • P09 (**) Pack consecutive duplicates of list elements into sublists.
  • P10 (*) Run-length encoding of a list.
  • P11 (*) Modified run-length encoding.
  • P12 (**) Decode a run-length encoded list.
  • P13 (**) Run-length encoding of a list (direct solution).
  • P14 (*) Duplicate the elements of a list.
  • P15 (**) Replicate the elements of a list a given number of times.
  • P16 (**) Drop every N'th element from a list.
  • P17 (*) Split a list into two parts; the length of the first part is given.
  • P18 (**) Extract a slice from a list.
  • P19 (**) Rotate a list N places to the left.
  • P20 (*) Remove the K'th element from a list.
  • P21 (*) Insert an element at a given position into a list.
  • P22 (*) Create a list containing all integers within a given range.
  • P23 (**) Extract a given number of randomly selected elements from a list.
  • P24 (*) Lotto: Draw N different random numbers from the set 1..M.
  • P25 (*) Generate a random permutation of the elements of a list.
  • P26 (**) Generate the combinations of K distinct objects chosen from the N elements of a list
  • P27 (**) Group the elements of a set into disjoint subsets.
  • P28 (**) Sorting a list of lists according to length of sublists

Arithmetic

  • P31 (**) Determine whether a given integer number is prime.
  • P32 (**) Determine the greatest common divisor of two positive integer numbers.
  • P33 (*) Determine whether two positive integer numbers are coprime.
  • P34 (**) Calculate Euler's totient function phi(m).
  • P35 (**) Determine the prime factors of a given positive integer.
  • P36 (**) Determine the prime factors of a given positive integer (2).
  • P37 (**) Calculate Euler's totient function phi(m) (improved).
  • P38 (*) Compare the two methods of calculating Euler's totient function.
  • P39 (*) A list of prime numbers.
  • P40 (**) Goldbach's conjecture.
  • P41 (**) A list of Goldbach compositions.

Logic and Codes

  • P46 (**) Truth tables for logical expressions.
  • P47 (*) Truth tables for logical expressions (2).
  • P48 (**) Truth tables for logical expressions (3).
  • P49 (**) Gray code.
  • P50 (***) Huffman code.

License

Distributed under the Eclipse Public License, the same as Clojure.

99-clojure-problems's People

Contributors

rodnaph avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.