標籤:題目串連https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/ Common Ancestor of a Binary TreeDescriptionGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of
標籤:題目串連https://leetcode.com/problems/single-number-iii/ Single Number IIIDescriptionGiven an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that
標籤:題目串連https://leetcode.com/problems/basic-calculator/ Basic CalculatorDescriptionImplement a basic calculator to evaluate a simple expression string.The expression string may contain open ( and closing parentheses ), the plus + or minus
標籤:題目串連https://leetcode.com/problems/valid-anagram/ Valid AnagramDescriptionGiven two strings s and t, write a function to determine if t is an anagram of s.For example, s = “anagram”, t = “nagaram”, return
標籤:d.看一個圖是不是強連通圖s.求出強連通分量,看看有沒有一個強連通分量包含所有點。c.Tarjan/*Tarjan演算法複雜度O(N+M)*/#include<iostream>#include<stdio.h>#include<string.h>using namespace std;const int MAXN=10010;//點數const int MAXM=100010;//邊數struct Edge{ int to,next;}edge[
標籤: 1.加文字-(UIImage *)addText:(UIImage *)img text:(NSString *)text1{ //get image width and height int w = img.size.width; int h = img.size.height; CGColorSpaceRef colorSpace