Skip to content

Instantly share code, notes, and snippets.

View lakshyaraj2006's full-sized avatar
🏠
Working from home

Lakshyaraj Dash lakshyaraj2006

🏠
Working from home
  • 22:54 (UTC +05:30)
View GitHub Profile
@lakshyaraj2006
lakshyaraj2006 / GuessTheNumber.java
Created December 6, 2025 04:44
Guess the number game. Java OOPs edition.
import java.util.Random;
import java.util.Scanner;
class Game {
int randNum;
int userNum;
int noOfGuesses = 0;
public Game() {
Random rand = new Random();
@lakshyaraj2006
lakshyaraj2006 / sum_of_two_nodes_in_range_equals_k.c
Last active November 4, 2025 12:40
Find the two nodes in a bst whose sum equals k, in a given range [x, y].
#include<stdio.h>
#include<stdlib.h>
struct TreeNode {
int key;
struct TreeNode* left;
struct TreeNode* right;
};
struct TreeNode* createNode(int key) {
@lakshyaraj2006
lakshyaraj2006 / sum_of_two_nodes_equals_k.c
Created November 4, 2025 12:36
Find the two nodes in a bst whose sum equals k.
#include<stdio.h>
#include<stdlib.h>
struct TreeNode {
int key;
struct TreeNode* left;
struct TreeNode* right;
};
struct TreeNode* createNode(int key) {
@lakshyaraj2006
lakshyaraj2006 / stack_using_queue.c
Created November 4, 2025 12:35
Implement Stack using Queue
#include<stdio.h>
#include<stdlib.h>
struct Queue {
int size;
int front;
int rear;
int* arr;
};
@lakshyaraj2006
lakshyaraj2006 / queue_using_stack.c
Created November 4, 2025 12:34
Implement Queue using Stack
#include<stdio.h>
#include<stdlib.h>
struct Stack {
int size;
int top;
int *arr;
};
struct Queue {
@lakshyaraj2006
lakshyaraj2006 / install.bat
Created November 4, 2025 03:08
Download youtube playlist
@echo off
echo Installing a Python package...
pip install yt-dlp
echo Package installation complete.
pause
@lakshyaraj2006
lakshyaraj2006 / tree_to_array.c
Created September 24, 2025 16:03
Convert tree to 1D array in C language.
#include<stdio.h>
#include<stdlib.h>
struct TreeNode {
char data;
struct TreeNode* left;
struct TreeNode* right;
};
struct TreeNode* createNode(char data) {
@lakshyaraj2006
lakshyaraj2006 / array_to_tree.c
Created September 24, 2025 15:45
Convert 1D array to tree in C language.
#include<stdio.h>
#include<stdlib.h>
struct TreeNode {
char data;
struct TreeNode* left;
struct TreeNode* right;
};
struct TreeNode* createNode(char data) {
@lakshyaraj2006
lakshyaraj2006 / evaluate_postfix.c
Last active September 1, 2025 05:22
A C program to convert infix to evaluate the postfix expression.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#include<ctype.h>
struct Stack {
int size;
int top;
char *arr;
@lakshyaraj2006
lakshyaraj2006 / infix_to_postfix.c
Last active September 1, 2025 05:22
A C program to convert infix notation to postfix notation.
#include<stdio.h>
#include<ctype.h>
#include<stdlib.h>
#include<stdbool.h>
#include<string.h>
struct Stack {
int size;
int top;
char *arr;