- [Data Structures] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#data-structures)
- [Linked Lists] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#linked-lists)
- [Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#trees)
- [Binary Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-trees)
- [Binary Search Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-search-tree)
- [Red-Black Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#red-black-tree)
- [AVL Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#avl-tree)
- [Tries] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#tries)
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
| GEMINI_API_KEY= | |
| LOCAL_LLM_BASE_URL= |
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
| import UIKit | |
| import Base | |
| class ViewController: UIViewController { | |
| @IBOutlet weak var sumView: UITextField! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| let base = BaseHelper() | |
| sumView.text = "Sum: \(base.getSum(first: 2, second: 3))" |
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
| import Foundation | |
| open class KotlinBase : NSObject { | |
| open class func initialize() | |
| } | |
| extension KotlinBase : NSCopying { | |
| } | |
| open class BaseHelper : KotlinBase { |
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
| buildscript { | |
| ext.kotlin_native_version = '0.6' | |
| repositories { | |
| mavenCentral() | |
| maven { | |
| url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" | |
| } | |
| } | |
| dependencies { | |
| classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:$kotlin_native_version" |
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 io.github.jitinsharma.androidapp | |
| import android.os.Bundle | |
| import android.support.v7.app.AppCompatActivity | |
| import io.github.jitinsharma.API_KEY | |
| import io.github.jitinsharma.Helper | |
| import io.github.jitinsharma.Model | |
| import kotlinx.android.synthetic.main.activity_main.* | |
| class MainActivity : AppCompatActivity() { |
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
| group 'io.github.jitinsharma' | |
| version '1.0-SNAPSHOT' | |
| buildscript { | |
| ext.kotlin_version = '1.2.21' | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { |
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 io.github.jitinsharma | |
| const val API_KEY = "abdfkdfgl453" | |
| class Helper { | |
| fun getSum(first: Int, second: Int): Int = first + second | |
| fun sliceFilterAndSort(list: List<String>): List<String> = | |
| list.subList(0, 4).filter { it.length > 3 }.sortedBy { it.length } | |
| companion object { | |
| val helperId: Int = 0 |
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 io.github.jitinsharma | |
| import kotlinx.serialization.* | |
| import kotlinx.serialization.json.JSON | |
| @Serializable | |
| data class Destination( | |
| var name : String? = "", | |
| var country : String? = "", | |
| var code : Int = 0, |
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
| final FrameMetrics[] metrics = {null}; | |
| Window window = getActivity().getWindow(); | |
| Handler mHandler = new Handler(); | |
| window.addOnFrameMetricsAvailableListener(new Window.OnFrameMetricsAvailableListener() { | |
| @Override | |
| public void onFrameMetricsAvailable(Window window, FrameMetrics frameMetrics, int i) { | |
| metrics[0] = new FrameMetrics(frameMetrics); | |
| } | |
| },mHandler); |