Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ Create a function that receives an integers array and returns the number that ap
| (1,1,2) | 2 |
| (2,2,1) | 1 |

var arry1 = [2,4,6,4,9,6,2]
print (9)

var arry2 = [1,1,2]
print (2)

var arry3 = [2,2,1]
print(1)

## 2nd Challenge
Create a function that receives a string then it converts uppercase letters into lowercase and vice versa. The function then should print the converted value.
Expand All @@ -21,6 +29,33 @@ Create a function that receives a string then it converts uppercase letters into
| My name is Ali | mY NAME IS aLI |
| sHroog | ShROOG |

func Hello(x: String){
}
return
("hello")

func Hi(x: String){
}
return("hI")

func Hello World(x: String){
}
return("hello")

func Hello World(x: String){
}
return
print("hELLO wORLD")

func My name is Ali(x: String){
}
print("mY NAME IS aLI")


func sHroog(x: String){
}
return(" ShROOG ")


## 3rd Challenge
Create a function that receives an array of items & arrays and returns one flattened array with all items exluding null values.
Expand All @@ -32,6 +67,19 @@ Create a function that receives an array of items & arrays and returns one flatt
| 3 | [[null, 3], [2, 4, 5, null], 0, 8, 3] | [3, 2, 4, 5, 0, 8, 3] |
| 4 | [3, 5, [5, 9, 0]] | [3, 5, 5, 9, 0] |

func arry1 = [1,[2,3,null,4],[null],5]

return(arry1: Int)


var arry2 = [7, 0,[null],[null, null, 9]]
return(arry2: Int)

var arry3 = [[null, 3], [2, 4, 5, null], 0, 8, 3]
return(arry3: Int)

var arry3 = {[[null, 3], [2, 4, 5, null], 0, 8, 3]
return(arry3: Int)

## 4th Challenge
Create a function that receives a string that contains combination of parentheses, square brackets, and curly braces. Then, it returns true if every opening bracket has a closing pair.
Expand Down