摘要:
void PrintMatrixClockwise(int** arr, int columns, int rows) { if (arr == nullptr || columns <= 0 || rows <= 0) return; int start = 0; while (columns > 阅读全文
摘要:
void MirrorRecursively(BinaryTreeNode* pRoot) { if (pRoot == nullptr || (pRoot->m_pLeft == nullptr && pRoot->m_pRight == nullptr)) return; BinaryTreeN 阅读全文
摘要:
struct BinaryTreeNode { int m_nValue; BinaryTreeNode* m_pLeft; BinaryTreeNode* m_pRight; }; bool HasSubTree(BinaryTreeNode* pRoot1, BinaryTreeNode* pR 阅读全文
摘要:
void ReorderOldEven(int* arr, unsigned int length) { if (arr == nullptr || length == 0) return; int* pBegin = arr; int* pEnd = arr + length - 1; while 阅读全文