摘要:
题目描述: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The 阅读全文
摘要:
题目描述: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Given linked list -- head = [4,5,1, 阅读全文
摘要:
题目描述: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums ex 阅读全文
摘要:
题目描述: You are playing the following Nim Game with your friend: There is a heap(堆) of stones on the table, each time one of you take turns to remove 1 阅读全文
摘要:
题目描述: Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another arr 阅读全文
摘要:
题目描述: Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word or 阅读全文
摘要:
题目: Share Share Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return th 阅读全文