Skip to content

Instantly share code, notes, and snippets.

import java.io.*;
import java.util.*; // insert this line too
class SolutionClass {
public static void main(String[] args) throws java.lang.Exception {
// copy from here
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
while (n != 1) {
import tensorflow as tf
import keras_preprocessing
from keras_preprocessing import image
from keras_preprocessing.image import ImageDataGenerator
TRAINING_DIR = "/content/drive/MyDrive/Colab Notebooks/Training"
training_datagen = ImageDataGenerator(
rescale=1.0 / 255,
horizontal_flip=True,
rotation_range=30,
import java.util.*;
public class LargestRectangleArea {
public static void main(String[] args) {
int[] heights = { 2, 1, 5, 6, 2, 3 };
System.out.println(largestRectangleArea(heights));
}
static int largestRectangleArea(int[] heights) {
package questions;
import java.util.*;
public class StockSpan {
public static void main(String[] args) {
int[] nums = { 100, 80, 60, 70, 60, 75, 85 };
// int[] nums = { 100 };
List<Integer> ans = new ArrayList<>();
getStockSpan(ans, new Stack<>(), nums);
package questions;
import java.util.*;
public class NearestSmallerToRight {
public static void main(String[] args) {
// int[] nums = { 4, 5, 2, 10, 8 };
// int[] nums = { 5, 4, 3, 2, 1 };
// int[] nums = { 1, 2, 3, 4, 5 };
int[] nums = { 10, 9, 11, 8, 13, 15, 6 };
package questions;
import java.util.*;
public class NearestSmallerToLeft {
public static void main(String[] args) {
// int[] nums = { 4, 5, 2, 10, 8 };
// int[] nums = { 5, 4, 3, 2, 1 };
int[] nums = { 1, 2, 3, 4, 5 };
List<Integer> ans = new ArrayList<>();
# String variables
myself: Ashutosh Dhande
fruit: "apple"
job: 'swe'
bio: |
hey my name is Ashutosh Dhande.
Wanna be SWE.
# write a single line in multiple lines
# To differentiate between documents we use --- and to end the document we use ... after this we dont add anything
#Key value pairs or KEY DATATYPE
"Ashutosh": "This is my name"
9658: "License Plate number"
---
#List data type
- VLSI
- EME
- ML
package questions;
import java.util.*;
public class NearestGreaterToLeft {
public static void main(String[] args) {
// int[] nums = { 1, 3, 2, 4 };
int[] nums = { 6, 5, 1, 2, 3 };
List<Integer> ans = new ArrayList<>();
Stack<Integer> stack = new Stack<>();
import java.util.*;
public class NearestGreaterToRight {
public static void main(String[] args) {
int[] nums = { 1, 3, 2, 4 };
List<Integer> ans = new ArrayList<>();
Stack<Integer> stack = new Stack<>();
getNextGreater(ans, stack, nums);
Object[] solution;
solution = ans.toArray();