Skip to content

Instantly share code, notes, and snippets.

View skushagra's full-sized avatar
🎯
Focusing

Kushagra S skushagra

🎯
Focusing
View GitHub Profile
"use client";
import { useEffect, useState } from "react";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
import numpy as np
import timeit
SIZE = 2000000
ls = np.random.rand(SIZE)
class LL:
def __init__(self, val: int = 0, next = None, prev = None):
self.val = val,
package com.example.booky
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import com.android.volley.Request
import com.android.volley.toolbox.JsonArrayRequest
import com.android.volley.toolbox.Volley
@skushagra
skushagra / deserialize.java
Created January 30, 2024 18:24
Code to deserialize an array, which is a level order traversal of a binary tree, into a binary tree.
/**
* Definition for binary tree
* class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) {
* val = x;
* left=null;
* right=null;
@skushagra
skushagra / rotate_mat.java
Created September 22, 2023 05:52
Rotate Matrix Code
public class rotatematrix {
public static void print(int[][] mat) {
int r = mat.length;
int c = mat[0].length;
for(int i = 0; i < r; i++) {
for(int j = 0; j < c; j++) {
System.out.print(mat[i][j] + " ");
}
System.out.println();