A broad summary of the changes or new functionality that this PR brings.
A detailed list of changes and new functionality. You can be very technical and specific in this section.
Afghanistan: af | |
Albania: al | |
Algeria: dz | |
Andorra: ad | |
Angola: ao | |
Antigua and Barbuda: ag | |
Argentina: ar | |
Armenia: am | |
Aruba: aw | |
Australia: au |
import 'package:flutter/material.dart'; | |
const double _kPanelHeaderCollapsedHeight = kMinInteractiveDimension; | |
const EdgeInsets _kPanelHeaderExpandedDefaultPadding = EdgeInsets.symmetric( | |
vertical: 64.0 - _kPanelHeaderCollapsedHeight, | |
); | |
class _SaltedKey<S, V> extends LocalKey { | |
const _SaltedKey(this.salt, this.value); |
fun main(){ | |
print(solution(3600)) | |
} | |
// output: 1h | |
fun solution(X: Int): String { | |
var secondsValue = TimeUnit.SECONDS() | |
var minutesValue = TimeUnit.MINUTES() | |
var hoursValue = TimeUnit.HOURS() | |
var daysValue = TimeUnit.DAYS() |
//Print numbers from 1 to 100. For multiples of 3 print Fizz instead of the number, for multiples of 5 print Buzz instead of the number | |
fun main(){ | |
repeat(100){ | |
val builder = StringBuilder() | |
val number = it+1 | |
val fizzer = number % 3 == 0 | |
if(fizzer) | |
builder.append("Fizz ") | |
val buzzer = number % 5 == 0 |
/** | |
* Given an input string, reverse the string word by word | |
* | |
* Input: "reverse words in a string" | |
* Output: "string a in words reverse" | |
*/ | |
fun main(){ | |
val words = "reverse words in a string" | |
print(words.run { |
/** | |
* Given an array, rotate the array to the left by k steps where k is non-negative | |
* | |
* Input: [1,2,3,4,5,6,7] ans k = 2 | |
* Output: [3,4,5,6,7,1,2] | |
*/ | |
fun main(){ | |
val array = intArrayOf(1,2,3,4,5,6,7) | |
val k = 3 | |
print(array.leftShit(k).asList()) |
/** | |
* Find Kth Largest element in an integer array | |
*/ | |
fun main(){ | |
val array = intArrayOf(1,1,1,2,1,4,1,7,8,4,2,5,9,9,4,7,2,0,4,6,1) | |
print(array.kTthLargestElement(3)) | |
} | |
fun IntArray.kTthLargestElement(k: Int): Int { |
/** | |
* Given a 2D matrix, if an element is 0 set its entire row and column to 0. Do it in place | |
* | |
* Input: | |
* [[1,1,1,1], | |
* [1,1,1,0], | |
* [1,1,1,1]] | |
* | |
* Output: | |
* [[1,1,1,0], |
/** | |
* Spiral Matrix | |
* Print all the elements in a matrix by following a spiral clockwise path in a matrix | |
* | |
* Input: | |
* [ | |
* [1 , 2, 3, 4, 5], | |
* [6 , 7, 8, 9, 10], | |
* [11 , 12, 13, 14, 15] | |
* ] |