コード例 #1
0
	int max()
	{
		if (empty()) return 0;
		if (head.empty()) 
			return tail.max();
		if (tail.empty()) 
			return head.max();
		else
			return std::max(tail.max(),head.max());
	}
コード例 #2
0
ファイル: Max_Queue.cpp プロジェクト: bravepam/CLRS
	T max()const { return maxOfTwo(A.max(), B.max()); }