【OJ】 Leet Code
Thereisnospon
在校本科生,渣渣一枚,正在向成为一名大牛而努力~
展开
-
Number of 1 Bits
Number of 1 Bits Total Accepted: 9192 Total Submissions: 24556 Question Solution Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also kn原创 2015-03-18 20:13:12 · 287 阅读 · 0 评论 -
Nim Game (Leet Code)
Nim Game My Submissions Question Total Accepted: 21019 Total Submissions: 42327 Difficulty: Easy You are playing the following Nim Game with your friend: There is a heap of stones原创 2015-11-22 16:30:47 · 328 阅读 · 0 评论 -
Delete Node in a Linked List (Leet Code)
Delete Node in a Linked List Total Accepted: 44856 Total Submissions: 101626 Difficulty: Easy Write a function to delete a node (except the tail) in a singly linked list, given only ac原创 2015-11-22 16:43:43 · 272 阅读 · 0 评论 -
Maximum Depth of Binary Tree (Leet Code)
Maximum Depth of Binary Tree Total Accepted: 102841 Total Submissions: 222386 Difficulty: Easy Given a binary tree, find its maximum depth. The maximum depth is the number of nodes al原创 2015-11-22 16:37:08 · 415 阅读 · 0 评论 -
Majority Element (Leet Code)
Majority Element Total Accepted: 58215 Total Submissions: 16289ions Question Solution Given an array of size n, find the majority element. The majority element is the element that原创 2015-08-31 08:27:02 · 469 阅读 · 0 评论 -
Ugly Number (Leet Code)
Ugly Number Total Accepted: 9440 Total Submissions: 30874 Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only i原创 2015-08-31 09:03:58 · 440 阅读 · 0 评论 -
Compare Version Numbers (Leet Code)
Compare Version Numbers Total Accepted: 31055 Total Submissions: 202365 Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 version2 return -原创 2015-08-31 08:32:20 · 374 阅读 · 0 评论 -
Excel Sheet Column Title
Excel Sheet Column Title Total Accepted: 17772 Total Submissions: 100508 Question Solution Given a positive integer, return its corresponding column title as appear in an Excel sh原创 2015-03-18 19:15:07 · 371 阅读 · 0 评论 -
Factorial Trailing Zeroes
Factorial Trailing Zeroes Total Accepted: 18149 Total Submissions: 66015 Question Solution Given an integer n, return the number of trailing zeroes in n!. Note: Your solution sho原创 2015-03-29 11:23:45 · 330 阅读 · 0 评论 -
Pascal's Triangle
Pascal's Triangle Total Accepted: 38612 Total Submissions: 126553 Question Solution Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5原创 2015-03-18 19:43:50 · 306 阅读 · 0 评论 -
Leet Code 100 Same Tree
Same Tree Question Total Accepted: 94258 Total Submissions: 224120 Difficulty: Easy Given two binary trees, write a function to check if they are equal or not. Two binary trees are原创 2015-11-22 16:47:59 · 386 阅读 · 0 评论