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 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
debugShowCheckedModeBanner: false, |
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
// Best Case is O(1) worst case in O(n) | |
// where n is the no of nodes in the tree represented by the object | |
function deepCheck(obj1, obj2) { | |
// If they are equal Primitives (think as leaf nodes) or they refer to same memory | |
if (obj1 === obj2) return true; | |
// If Both are NaN | |
if (obj1 === NaN && obj2 === NaN) return true; |
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
/* | |
* Custom generic Linked List implementation in Java. | |
* This class is for working with Linked List related interview problems. | |
* | |
* It is intended to be extended with a Type paramater as follows: | |
* | |
* class PracticeSoln extends CustomLinkedList<Integer> { | |
* | |
* protected void solution() { | |
* Node temp = this.head; |
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 java.util.*; | |
class Bowl { | |
static int getModifiedBowl(int[] marbles) { | |
for (int i = marbles.length - 1; i >= 0; i--) { | |
if (marbles[i] < 9) { | |
// This one is not required here, but in online compiler it might ask to modify the original array | |
// sent to the funtion |
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 java.util.*; | |
class Intern { | |
static String getStringValue(int n) { | |
switch (n) { | |
case 1: return "First"; | |
case 2: return "Second"; | |
case 3: return "Third"; | |
case 4: return "Fourth"; | |
case 5: return "Fifth"; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
int getRandomNumber(int lower, int upper) { | |
return (rand() % (upper - lower + 1)) + lower; | |
} | |
int main() { |
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
/** | |
* You can copy, modify, distribute and perform the work, even for commercial purposes, | |
* all without asking permission. | |
* | |
* @Author: Andrei N. CIOBANU | |
*/ | |
use synx_warm_up; | |
CREATE TABLE regions ( |