摘要:
题目描述:Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For... 阅读全文
摘要:
题目描述:Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order re... 阅读全文
摘要:
题目描述:Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4... 阅读全文
摘要:
题目描述:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".解题方案: 1 class Solution { 2 public: 3 s... 阅读全文
摘要:
题目描述:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a si... 阅读全文
摘要:
题目描述:Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transactio... 阅读全文