This file contains 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
import kotlin.Metadata; | |
import kotlin.jvm.functions.Function0; | |
import kotlin.jvm.internal.Intrinsics; | |
import org.jetbrains.annotations.NotNull; | |
@Metadata( | |
mv = {1, 1, 7}, | |
bv = {1, 0, 2}, | |
k = 2, | |
d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u001a\u0019\u0010\u0000\u001a\u00020\u00012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\u0002\u0010\u0005\u001a\u0014\u0010\u0006\u001a\u00020\u00012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00010\u0007¨\u0006\b"}, |
This file contains 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
import kotlin.Metadata; | |
import kotlin.jvm.functions.Function0; | |
import kotlin.jvm.internal.Intrinsics; | |
import org.jetbrains.annotations.NotNull; | |
@Metadata( | |
mv = {1, 1, 7}, | |
bv = {1, 0, 2}, | |
k = 2, | |
d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u001a\u0019\u0010\u0000\u001a\u00020\u00012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\u0002\u0010\u0005\u001a\u0017\u0010\u0006\u001a\u00020\u00012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00010\u0007H\u0086\b¨\u0006\b"}, |
This file contains 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
/** | |
* Performs the given [action] on each element. | |
*/ | |
@kotlin.internal.HidesMembers | |
public header inline fun <T> Iterable<T>.forEach(action: (T) -> Unit): Unit | |
/** | |
* Performs the given [action] on each element, providing sequential index with the element. | |
* @param [action] function that takes the index of an element and the element itself | |
* and performs the desired action on the element. |
This file contains 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
const arr = () => { | |
console.log("executed") | |
} | |
arr(); |
This file contains 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 readinglist | |
class DirectoryExplorer(val user:String){ | |
inner class PermissionCheck(){ | |
fun validatePermission(){ | |
} | |
} |
This file contains 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
class Log(){ | |
companion object Factory{ | |
@JvmStatic fun createFileLog(filename: String):Log = Log(filename) | |
//we can access this static function from java using @JvmStatic as Log.createFileLog("File.txt") | |
} | |
//second companion object not possible | |
constructor(filename:String):this(){} |
This file contains 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
"use strict"; | |
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } } | |
var log = console.log; | |
function example(a, b, c) { | |
log({ a: a, b: b, c: c }); | |
return a * b * c; | |
} |
This file contains 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
//Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements | |
//https://www.youtube.com/watch?v=utE_1ppU5DY | |
//pass 1 | |
//1.copy first d elements in temp array | |
//2.move original array forward by d | |
//3.start updating vlues in originl array from n-d th position | |
// time complexity n space complexity d | |
function rotate1(arr=[],d){ | |
let n = arr.length | |
let temp = [] |
OlderNewer