Skip to content
Open

. #39

Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/coding-challenges.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ Create a function that receives an integers array and returns the number that ap
| (1,1,2) | 2 |
| (2,2,1) | 1 |

fun OnlyOnce(var numbers: Array<Int>):Int{
foreach (i in numbers.size){
var x : Int
if (i == x){
//do nothing its existed
}
else{
return i
}
x = i
}
}

## 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 +33,14 @@ Create a function that receives a string then it converts uppercase letters into
| My name is Ali | mY NAME IS aLI |
| sHroog | ShROOG |

fun Strings.toLowercase (val h :String ){
this.super()
if(h.char){}
}





## 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 @@ -33,6 +53,10 @@ Create a function that receives an array of items & arrays and returns one flatt
| 4 | [3, 5, [5, 9, 0]] | [3, 5, 5, 9, 0] |


fun (array:Array<Int>):Array<Int>{
return array.filter(Number)
}

## 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 All @@ -49,5 +73,11 @@ Create a function that receives a string that contains combination of parenthese
| {[(}]) | true |
| {[}]) | false |


fun g (var g : String):Boolean{
if (g.count > 1){
return false
}
elseif(){
}
}