Category: c / c++
A Singly Linked List is a one-direction List that uses a pointer to connect between Nodes. To reverse a linked list, you need to re-connect the directions, for example: …
There are N gas stations along a circular route, where the amount of gas at station i is gas. You have a car with an unlimited gas tank and …
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find …
Given a binary tree, you are asked to check whether it is a mirror of itself (i.e, symmetric around its center): https://leetcode.com/problems/symmetric-tree/ For example, this binary tree is symmetric: …
Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = “anagram”, t = “nagaram”, return true. s …