This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mwhive.kotlTraining | |
| //Второе задание, которое делать не обязательно :) | |
| val passwordList: ArrayList<String> = arrayListOf() | |
| fun main(args: Array<String>) { | |
| val charArray = charArrayOf('a', 'b', 'c', 'd', 'e') | |
| val passLength = 3 | |
| findAllPasswords(charArray, passLength) | |
| println("Overall number of possible passwords of length $passLength from charset of length ${charArray.size} is: ${passwordList.size} ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mwhive.kotlTraining | |
| import java.util.ArrayList | |
| import java.util.Arrays | |
| val solutionList: ArrayList<String> = arrayListOf() | |
| fun main(args: Array<String>) { | |
| val numArray = arrayOf(0,1,3,2) // <-- изначальный массив | |
| val target = 5 // <-- цель |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This method displays the given price on the screen. | |
| */ | |
| private void displayPrice(int number) { | |
| TextView priceTextView = (TextView) findViewById(R.id.price_text_view); | |
| priceTextView.setText(NumberFormat.getCurrencyInstance().format(number)); | |
| } |
NewerOlder