Skip to content

Instantly share code, notes, and snippets.

View mudassaralichouhan's full-sized avatar
:octocat:
It’s not a bug; it’s an undocumented feature.

Mudassar Ali mudassaralichouhan

:octocat:
It’s not a bug; it’s an undocumented feature.
View GitHub Profile
/*
*
*/
#include "iostream"
#include "cmath"
class NumberSystem
{
public:
/*
* Binary Search Tree (BST) Concepts and Operations
*
* A Binary Search Tree (BST) is a binary tree where:
* 1. The left subtree of a node contains only nodes with keys less than the node's key.
* 2. The right subtree of a node contains only nodes with keys greater than the node's key.
* 3. Both the left and right subtrees must also be binary search trees.
*
* Operations on Binary Search Tree:
*
@mudassaralichouhan
mudassaralichouhan / dequeue.cc
Last active April 26, 2024 10:30
Queue FIFO.
/**
* Dequeue:
* Dequeue is also known as Double Ended Queue.
* As the name suggests double ended,
* it means that an element can be inserted or removed from both ends of the queue, unlike the other queues
* in which it can be done only from one end. Because of this property, it may not obey the First In First Out property.
*
* implement using doubly linked list
*
* Operation Description Time Complexity
@mudassaralichouhan
mudassaralichouhan / stack-using-unique_ptr.cc
Last active April 8, 2024 20:57
Stack principle of Last In First Out (LIFO)
#include "iostream"
#include "memory"
struct StackHolder {
std::string data;
};
class Stack {
private:
int idx = -1;
@mudassaralichouhan
mudassaralichouhan / CDLL.cc
Last active November 13, 2024 17:25
Link List [$ g++ main.cc -o main.o && ./main.o]
/**
* Circular Double Linked List
*
*/
#include "iostream"
using namespace std;
struct Node {
https://picsum.photos/400/300
https://dummyimage.com/250/ffffff/000000
https://dummyimage.com/250x300
https://dummyimage.com/300.png/09f/fff
https://dummyimage.com/
#include <vector>
#include <algorithm>
vector<int> findTopThree(vector<int>& score) {
vector<int> topThree;
int f = INT_MIN, s = INT_MIN, t = INT_MIN;
for (int i = 0; i < score.size(); i++) {
if (score[i] > f) {
docker run --rm -v $(pwd):/app -w /app php php artisan serve
docker run --rm -v $(pwd):/app composer install
https://docs.docker.com/engine/reference/commandline/container_ls/
docker container ls --all
docker rm -vf $(docker ps -aq)
docker kill $(docker ps -q)
docker kill <container_id>
docker rm <container_id_or_name>
@mudassaralichouhan
mudassaralichouhan / demo.sh
Created June 25, 2023 10:06
import *.sql file form terminal
mysql -u root -p laravel_and_vite < /home/darkside/Downloads/world.sql
@mudassaralichouhan
mudassaralichouhan / phpstorm.desktop
Created January 28, 2023 14:37
move on /usr/share/application/
[Desktop Entry]
Version=2021.2.2
Name=PHP Storm
Comment=PHP Programing Web IDE Text Editor
Keywords=Programming;IDE;Web;Text;Editor
Exec=/opt/php-storm-212.5284.49/bin/phpstorm.sh
Terminal=false
Type=Application
Icon=/opt/php-storm-212.5284.49/bin/phpstorm.svg
Categories=JetBrain;Programming;WebIDE;