摘要:
标题:Swap Nodes in Pairs通过率:32.5难度:中等Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should retu... 阅读全文
摘要:
标题:Construct Binary Tree from Preorder and Inorder Traversal通过率:26.5难度: 中等Given preorder and inorder traversal of a tree, construct the binary tree.No... 阅读全文
摘要:
标题:Number of 1 Bits通过率:40.0%难度: 简单Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming ... 阅读全文
摘要:
标题:Reverse Words in a String通过率: 14.8% 难度: 中等Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "... 阅读全文
摘要:
标题:Add Two Numbers通过率:22.6%难度:中等You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each ... 阅读全文
摘要:
标题:Reverse Bits通过率:27.6%难度:简单Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as0000001010010... 阅读全文
摘要:
标题:Edit Distance通过率:26.1%难度:难Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counte... 阅读全文
摘要:
标题:Rotate Image通过率:31.7%难度:中等You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this... 阅读全文
摘要:
标题:Spiral Matrix通过率:20.8%难度:中等Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the f... 阅读全文
摘要:
标题:Sort Colors通过率:32.5%难度:中等Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the... 阅读全文