Skip to content

Instantly share code, notes, and snippets.

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