随笔分类 -  online judge:leetcode

摘要:Table holds the x coordinate of some points on x axis in a plane, which are all integers. Write a query to find the shortest distance between two poin 阅读全文
posted @ 2019-01-07 17:50 Angel_Kitty 阅读(707) 评论(0) 推荐(0) 编辑
摘要:There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it 阅读全文
posted @ 2019-01-07 17:39 Angel_Kitty 阅读(445) 评论(0) 推荐(0) 编辑
摘要:There is a table A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million. Write a SQL solution t 阅读全文
posted @ 2019-01-07 17:28 Angel_Kitty 阅读(262) 评论(0) 推荐(0) 编辑
摘要:A binary tree is univalued if every node in the tree has the same value. Return if and only if the given tree is univalued. Example 1: Example 2: Note 阅读全文
posted @ 2019-01-04 09:25 Angel_Kitty 阅读(471) 评论(0) 推荐(0) 编辑
摘要:In a array of size , there are unique elements, and exactly one of these elements is repeated N times. Return the element repeated times. Example 1: E 阅读全文
posted @ 2019-01-04 09:23 Angel_Kitty 阅读(418) 评论(0) 推荐(0) 编辑
摘要:Given a binary matrix , we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally means th 阅读全文
posted @ 2019-01-04 09:22 Angel_Kitty 阅读(405) 评论(0) 推荐(0) 编辑
摘要:905. Sort Array By Parity Given an array of non negative integers, return an array consisting of all the even elements of , followed by all the odd el 阅读全文
posted @ 2018-12-22 23:05 Angel_Kitty 阅读(316) 评论(0) 推荐(0) 编辑
摘要:709. To Lower Case Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Example 2: E 阅读全文
posted @ 2018-12-21 20:27 Angel_Kitty 阅读(192) 评论(0) 推荐(0) 编辑
摘要:804. Unique Morse Code Words International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follo 阅读全文
posted @ 2018-12-21 20:27 Angel_Kitty 阅读(237) 评论(0) 推荐(0) 编辑
摘要:929. Unique Email Addresses Every email consists of a local name and a domain name, separated by the @ sign. For example, in , is the local name, and 阅读全文
posted @ 2018-12-20 00:33 Angel_Kitty 阅读(400) 评论(0) 推荐(0) 编辑
摘要:771. Jewels and Stones You're given strings representing the types of stones that are jewels, and representing the stones you have. Each character in 阅读全文
posted @ 2018-12-18 23:38 Angel_Kitty 阅读(245) 评论(0) 推荐(0) 编辑