摘要:
题目: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path b 阅读全文
摘要:
题目 : Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If the 阅读全文
摘要:
题目: Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an 阅读全文
摘要:
题目: Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Note: There ar 阅读全文
摘要:
题目: Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when on 阅读全文
摘要:
题目: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, w 阅读全文