Function Fountain

"There is no function
without fun"

Welcome to 🌟 Function Fountain 🌟! Dive into a world of coding with examples in all major programming languages! 🚀 Whether you’re a beginner or a pro, explore, learn, and elevate your skills with us! 💻 Happy Coding! 🌐

ImageFunctionDescriptioncomplexity
AddTwoNumbers()A Swift function to add two numbers1
subtractTwoNumbers()This function subtracts two numbers.
sortArrayDesc()This function sorts an array in descending order.1
sortArrayAscending()A Swift function that sorts an array in ascending order.2
Reverse String in Swift()This function reverses a string in Swift programming language.1
Reverse Digits in Swift()This function takes an integer as input and outputs the integer with its digits in reverse order.2
Reverse Array in Swift()This function reverses elements in an array2
remove-array-duplicates()This function eliminates all duplicate elements from an array in Swift.2
MultiplyTwoNumbers()A swift function to multiply two integer numbers.1
mergeArrays()This function merges two arrays.1
Generate Random String in Swift()Sample Swift function to generate a random string.2
generate-random-password()This function generates a random password that includes uppercase, lowercase, numbers and special characters.2
Generate Random Number()This function generates a random number in Swift programming language.1
generatePrimeNumbersRange()This function takes two integers as input and generates all prime numbers within this range.2
generate-nth-prime-number()Function to generate the nth prime number2
findTriangularNumbersInRange()This Swift function finds all the triangular numbers within a specified range.2
find-sum-squares-range()This function calculates the sum of squares for a given range in Swift.2
find-sum-of-digits()A Swift function that calculates the sum of all digits in the given number.2
findSumOddNumbersRange()A function to find the sum of all odd numbers within a given range.2
findSumEvenNumbersInRange()This function calculates the sum of even numbers in a specified range.2
find-sum-cubes-range()A function that calculates the sum of cubes within a particular range.2
find-strong-numbers-range()This function finds all strong numbers in a given range.2
findStringLenght()A Swift function to find the length of a string2
find-square-root()This function calculates the square root of a given number.1
find-square-numbers-range()This function finds all square numbers within a given range.2
find-square()This function calculates the square of a number.1
findSecondSmallestElement()This function finds the second smallest element in an array.2
Find Second Largest Element in an Array()This Swift function finds the second largest element in a given array of integers.2
find-prime-factors()This function determines the prime factors of a given number in Swift.2
find-power()A Swift function to calculate the power of a number2
find-perimeter-pentagon()This function calculates the perimeter of a pentagon given the length of one side.1
findPerimeterOctagon()This function calculates the perimeter of an octagon.2
findPerimeterIsoscelesTriangle()This function calculates the perimeter of an isosceles triangle.2
find-perimeter-hexagon()This function calculates the perimeter of a hexagon given the length of its sides.2
findPalindromeNumbersRange()This function finds and returns all palindrome numbers in a given range.2
find-nth-perfect-number-range()This function finds the nth perfect number in a given range.2
find-nth-perfect-number()Finds the nth perfect number in the sequence of perfect numbers.2
Find-nth-Fibonacci-Number()This function calculates the nth Fibonacci number in Swift.2
find-narcissistic-numbers-range()This function is designed to find all the narcissistic numbers in a given range.2
findModeNumbersRange()This function finds the mode in a numerical range.2
Find mode in array()The function finds the mode in a given array.2
findMinElement()A function to find the minimum element in an array.1
findMedianNumbersRange()This function calculates and returns the median of a list of numbers within a specified range.2
findMedianArray()Function to find the median of an array1
find-mean-array()A Swift function to calculate mean of an array of numbers2
Find Max Element in Swift()A Swift function to find the maximum element in an array.2
findLuckyNumbersRange()A function that returns the lucky numbers within a given range.2
find-lcm()This function calculates the Lowest Common Multiple (LCM) of two numbers.2
findHarshadNumbersRange()This Swift function finds all Harshad numbers within a specified range.2
find-happy-numbers-range()Function to find happy numbers in a given range.2
find-gcd()A function to find the greatest common divisor (GCD) of two integers2
find-fibonacci-numbers-range()This function returns the Fibonacci sequence within a specified range.2
Find Factors of a Number()This function finds all factors of a given number.2
Find Element Index()This function finds the index of a given element in an array.2
findDistanceBetweenTwoPoints3D()This function calculates the distance between two points in a three-dimensional space.2
Find Distance Between Two Points in 2D()Function that calculates the 2D distance between two points using Swift2
findCubeRoot()This function finds the cube root of a given number in Swift.2
findCube()This function calculates the cube of a number1
find-circumference-circle()This function calculates the circumference of a circle in Swift.1
findCharacterFromAsciiValue()This function returns the corresponding character from a provided ASCII value.1
find-average-numbers-range()A function that computes the average of numbers in a given range.2
find-array-union()This function finds the union of two arrays in Swift.2
find-array-intersection()This function finds the intersecting elements in two arrays.2
findArrayDifference()This is a function in Swift that finds the difference between two arrays.2
Find Array Average in Swift()This function calculates the average of an array of numbers in Swift.2
findArmstrongNumbersRange()A Swift function to find all Armstrong numbers in a given range.2
findAngleBetweenClockHands()Calculates the smaller angle between the hour and the minute hand on a clock given the time in hours and minutes.2
find-ascii-value()This function returns the ASCII value of a given character.1
DivideTwoNumbers()A Swift function to divide two numbers1
countWords()Counts the number of words in a given string2
Count Vowels()This function counts the number of vowels in a provided string.2
countConsonants()This function counts the number of consonants in a given string2
convertWeeksToMonthsAndWeeks()The function convertWeeksToMonthsAndWeeks converts given number of weeks into equivalent months and weeks, considering 1 month = 4 weeks.2
ConvertToUpperCase()This function converts lowercase letters to uppercase.1
convertToLowercase()Converting characters to lowercase in Swift1
Convert Octal to Hexadecimal()This function converts an octal number to its hexadecimal equivalent.2
Octal to Decimal Converter in Swift()This function converts any octal number to its decimal equivalent.2