随笔分类 -  leetcode

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页
https://leetcode.com/problemset/all/
摘要:Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given inte 阅读全文
posted @ 2018-10-31 11:46 bernieloveslife 阅读(103) 评论(0) 推荐(0)
摘要:You have a list of words and a pattern, and you want to know which words in words matches the pattern. A word matches the pattern if there exists a pe 阅读全文
posted @ 2018-10-31 11:46 bernieloveslife 阅读(87) 评论(0) 推荐(0)
摘要:Given an array A of non negative integers, half of the integers in A are odd, and half of the integers are even. Sort the array so that whenever A[i] 阅读全文
posted @ 2018-10-31 11:46 bernieloveslife 阅读(158) 评论(0) 推荐(0)
摘要:You are given a map in form of a two dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/ve 阅读全文
posted @ 2018-10-30 12:09 bernieloveslife 阅读(96) 评论(0) 推荐(0)
摘要:Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp 阅读全文
posted @ 2018-10-30 12:09 bernieloveslife 阅读(101) 评论(0) 推荐(0)
摘要:A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com 阅读全文
posted @ 2018-10-30 12:09 bernieloveslife 阅读(150) 评论(0) 推荐(0)
摘要:Write a class StockSpanner which collects daily price quotes for some stock, and returns the span of that stock's price for the current day. The span 阅读全文
posted @ 2018-10-30 12:09 bernieloveslife 阅读(237) 评论(0) 推荐(0)
摘要:Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may ass 阅读全文
posted @ 2018-10-30 12:09 bernieloveslife 阅读(145) 评论(0) 推荐(0)
摘要:X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and descrip 阅读全文
posted @ 2018-10-29 13:12 bernieloveslife 阅读(199) 评论(0) 推荐(0)
摘要:You are given an array A of strings. Two strings S and T are special equivalent if after any number of moves, S == T. A move consists of choosing two 阅读全文
posted @ 2018-10-29 13:12 bernieloveslife 阅读(118) 评论(0) 推荐(0)
摘要:Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th 阅读全文
posted @ 2018-10-29 13:12 bernieloveslife 阅读(88) 评论(0) 推荐(0)
摘要:Given a positive integer N, find and return the longest distance between two consecutive 1's in the binary representation of N. If there aren't two co 阅读全文
posted @ 2018-10-29 13:12 bernieloveslife 阅读(100) 评论(0) 推荐(0)
摘要:Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. Example 1: Inpu 阅读全文
posted @ 2018-10-29 13:12 bernieloveslife 阅读(138) 评论(0) 推荐(0)
摘要:Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representation 阅读全文
posted @ 2018-10-26 10:55 bernieloveslife 阅读(117) 评论(0) 推荐(0)
摘要:Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. Example 1: Input: 5 O 阅读全文
posted @ 2018-10-26 10:55 bernieloveslife 阅读(94) 评论(0) 推荐(0)
摘要:Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positi 阅读全文
posted @ 2018-10-26 10:55 bernieloveslife 阅读(102) 评论(0) 推荐(0)
摘要:You're now a baseball game point recorder. Given a list of strings, each string can be one of the 4 following types: 1. Integer (one round's score): D 阅读全文
posted @ 2018-10-26 10:55 bernieloveslife 阅读(115) 评论(0) 推荐(0)
摘要:Given a non empty array of digits representing a non negative integer, plus one to the integer. The digits are stored such that the most significant d 阅读全文
posted @ 2018-10-26 10:54 bernieloveslife 阅读(97) 评论(0) 推荐(0)
摘要:Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi 阅读全文
posted @ 2018-10-25 10:37 bernieloveslife 阅读(136) 评论(0) 推荐(0)
摘要:Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
posted @ 2018-10-25 10:36 bernieloveslife 阅读(140) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页