Skip to content

Instantly share code, notes, and snippets.

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} ")
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 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));
}