Welcome to the Elixir training repository! Elixir is a functional, concurrent programming language built on the Erlang VM, designed for building scalable and maintainable applications. This repository contains 20 exercises aimed at familiarizing you with Elixir's syntax and functional programming concepts, helping you sharpen your skills through practical problem-solving.
Every developer's toolbox should include a variety of languages and paradigms. Understanding a functional programming language like Elixir equips you with powerful tools for solving problems in ways that object-oriented or procedural languages might not, especially in the areas of concurrency, immutability, and data transformation.
To get started, you need to have Elixir installed on your system. Follow the instructions on the oficial website to install Elixir for your operating system.
Below is a list of exercises designed to gradually introduce you to key Elixir concepts. Each exercise is linked to its respective description:
- Hello, World 👋 - Get started with Elixir by creating a simple greeting function.
- Fibonacci Sequence 🐚 - Implement a function to generate Fibonacci numbers using recursion.
- Factorial Calculation 🔢 - Write a recursive function to calculate the factorial of a number.
- List Sum ➕ - Sum the elements of a list using recursion or higher-order functions.
- Palindrome Check 🔁 - Determine if a string is a palindrome.
- Flatten a List 🗺️ - Implement a function to flatten nested lists into a single list.
- Map Implementation 🗺️ - Create your own version of the map function to apply a transformation to a list.
- Count Vowels in a String 🔤 - Count the number of vowels in a given string.
- Find Maximum in a List 📈 - Write a function to find the maximum element in a list.
- Remove Duplicates from a List 🗑️ - Eliminate duplicate elements from a list.
- Caesar Cipher 🏛️ - Implement the Caesar Cipher encryption technique.
- Prime Numbers 🔍 - Write a function to check if a number is prime.
- List Reverse 🔄 - Reverse the elements of a list.
- Anagram Check 🔤 - Check if two strings are anagrams of each other.
- Merge Sorted Lists 🔀 - Merge two sorted lists into a single sorted list.
- Binary Search Implementation 🔎 - Implement binary search on a sorted list of numbers.
- String Compression 📦 - Compress a string by counting consecutive characters.
- Zip Two Lists 🧵 - Combine two lists into a list of tuples.
- Group Elements by Parity 🚻 - Group numbers by even and odd values.
- Find the N-th Largest Element 🔍 - Find the n-th largest element in a list.
Solutions to the exercises are available in the solutions branch. To view the solutions, switch to the branch using the following command:
git checkout solutions
Feel free to compare your approaches with the solutions provided, and don't hesitate to experiment with different techniques as you learn Elixir.