Category:Swift
From Rosetta Code
Swift
This programming language may be used to instruct a computer to perform a task.
Listed below are all of the tasks on Rosetta Code which have been solved using Swift.
This programming language may be used to instruct a computer to perform a task.
Official website |
---|
Execution method: | Compiled (machine code) |
---|---|
Garbage collected: | Reference counting |
Parameter passing methods: | By reference, By value |
Type safety: | Safe |
Type strength: | Strong |
Type compatibility: | Nominative |
Type checking: | Dynamic, Static |
See Also: |
Your Help Needed
If you know Swift, please write code for some of the tasks not implemented in Swift.
Swift is a general purpose, multi-paradigm, systems programming language developed by Apple Inc. originally for Apple platforms. Linux support was added when open source Swift was released. It runs on the Objective-C runtime on Darwin and is mainly used with the Cocoa API. It was announced at WWDC 2014.
If you know Swift, please write code for some of the tasks not implemented in Swift.
Pages in category "Swift"
The following 336 pages are in this category, out of 336 total.
A
- A+B
- ABC Problem
- Abundant, deficient and perfect number classifications
- Accumulator factory
- Ackermann function
- Active object
- Add a variable to a class instance at runtime
- Address of a variable
- AKS test for primes
- Amicable pairs
- Anagrams
- Anonymous recursion
- Apply a callback to an array
- Arithmetic-geometric mean
- Arithmetic/Complex
- Arithmetic/Integer
- Array concatenation
- Array length
- Arrays
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Averages/Arithmetic mean
- Averages/Mode
B
C
- Caesar cipher
- Call a foreign-language function
- Call a function
- Call an object method
- Case-sensitivity of identifiers
- Catalan numbers
- Catamorphism
- Character codes
- Chinese remainder theorem
- Cholesky decomposition
- Church Numerals
- Classes
- Closest-pair problem
- Closures/Value capture
- Combinations
- Combinations with repetitions
- Comma quibbling
- Command-line arguments
- Comments
- Compound data type
- Concurrent computing
- Constrained genericity
- Copy a string
- Count in octal
- Count the coins
- CRC-32
- Create a two-dimensional array at runtime
- Cumulative standard deviation
- Currying
D
E
F
- Factorial
- Factors of an integer
- Farey sequence
- Fibonacci sequence
- Filter
- Find common directory path
- Find largest left truncatable prime in a given base
- Find limit of recursion
- Find the intersection of two lines
- Find the last Sunday of each month
- First-class functions
- FizzBuzz
- Flatten a list
- Flipping bits game
- Forward difference
- Fractal tree
- Function composition
- Function definition
G
H
- Hailstone sequence
- Handle a signal
- Happy numbers
- Hash from two arrays
- Haversine formula
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Newbie
- Hello world/Newline omission
- Hello world/Standard error
- Hello world/Text
- Heronian triangles
- Higher-order functions
- History variables
- Hofstadter-Conway $10,000 sequence
- Horner's rule for polynomial evaluation
- Hostname
- HTTP
- HTTPS
- Huffman coding
I
L
- Langton's ant
- Last Friday of each month
- Leap year
- Least common multiple
- Levenshtein distance
- Linear congruential generator
- Literals/Floating point
- Literals/Integer
- Literals/String
- Logical operations
- Longest common subsequence
- Longest Common Substring
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- Lucas-Lehmer test
- Lucky and even lucky numbers
- Luhn test of credit card numbers
- LZW compression
M
N
O
P
- Palindrome detection
- Pangram checker
- Parametric polymorphism
- Parsing/RPN calculator algorithm
- Parsing/Shunting-yard algorithm
- Pascal's triangle
- Password generator
- Pattern matching
- Percentage difference between images
- Percolation/Bond percolation
- Perfect numbers
- Permutations
- Phrase reversals
- Pick random element
- Play recorded sounds
- Playing cards
- Polymorphic copy
- Polymorphism
- Population count
- Power set
- Primality by trial division
- Prime decomposition
- Priority queue
- Problem of Apollonius
- Proper divisors
- Pythagorean quadruples
- Pythagorean triples
R
- Range extraction
- Read entire file
- Real constants and functions
- Reduced row echelon form
- Regular expressions
- Remove duplicate elements
- Repeat
- Repeat a string
- Return multiple values
- Reverse a string
- Reverse words in a string
- RIPEMD-160
- Rock-paper-scissors
- Roman numerals/Decode
- Roman numerals/Encode
- Rot-13
- Run-length encoding
- Runge-Kutta method
S
- Safe addition
- Search a list
- Semiprime
- Sequence of primes by trial division
- Set
- Short-circuit evaluation
- Sierpinski carpet
- Sierpinski triangle
- Sieve of Eratosthenes
- Singleton
- Singly-linked list/Element definition
- Sleep
- Sort an integer array
- Sort disjoint sublist
- Sort using a custom comparator
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting algorithms/Comb sort
- Sorting algorithms/Heapsort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Pancake sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Shell sort
- Sorting algorithms/Sleep sort
- Sorting algorithms/Stooge sort
- Speech synthesis
- Stable marriage problem
- Stack
- Stair-climbing puzzle
- String append
- String case
- String comparison
- String concatenation
- String interpolation (included)
- String length
- String matching
- String prepend
- Strip a set of characters from a string
- Substring
- Substring/Top and tail
- Sudoku
- Sum and product of an array
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of squares
- Symmetric difference
- Synchronous concurrency
- System time