Skip to content

Instantly share code, notes, and snippets.

@ICyperior
ICyperior / Reverse Binary Tree.cpp
Last active September 3, 2022 20:22
Reverse a binary tree.
#include <iostream>
#include <vector>
#include <queue>
class Node {
public:
int data;
Node* left, * right;
Node(int data) {
this->data = data;
@ICyperior
ICyperior / Reverse Linked List.cpp
Last active September 3, 2022 19:32
Reverse a linked list.
#include <iostream>
#include <vector>
class Node {
public:
int data;
Node* next;
Node(int data) {
this->data = data;
next = NULL;