03 2020 档案

摘要:Problem : Given two arrays, write a function to compute their intersection. Example 1: Example 2: Note: Each element in the result must be unique. The 阅读全文
posted @ 2020-03-31 22:47 littledy 阅读(88) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a string, find the first non repeating character in it and return it's index. If it doesn't exist, return 1. Examples: Note: You may a 阅读全文
posted @ 2020-03-31 00:04 littledy 阅读(92) 评论(0) 推荐(0) 编辑
摘要:Problem : Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which mak 阅读全文
posted @ 2020-03-30 23:33 littledy 阅读(78) 评论(0) 推荐(0) 编辑
摘要:Problem : Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight). Example 1: Exam 阅读全文
posted @ 2020-03-30 23:21 littledy 阅读(75) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a column title as appear in an Excel sheet, return its corresponding column number. For example: Example 1: Example 2: Example 3: 思路 : 阅读全文
posted @ 2020-03-30 23:10 littledy 阅读(95) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end ind 阅读全文
posted @ 2020-03-30 16:41 littledy 阅读(90) 评论(0) 推荐(0) 编辑
摘要:Problem : Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element 阅读全文
posted @ 2020-03-30 15:25 littledy 阅读(75) 评论(0) 推荐(0) 编辑
摘要:Problem : Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements 阅读全文
posted @ 2020-03-30 01:00 littledy 阅读(79) 评论(0) 推荐(0) 编辑
摘要:Problem : Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number mu 阅读全文
posted @ 2020-03-29 23:18 littledy 阅读(76) 评论(0) 推荐(0) 编辑
摘要:Problem : Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non zero elements. Exampl 阅读全文
posted @ 2020-03-29 23:03 littledy 阅读(64) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a singly linked list, determine if it is a palindrome. Example 1: Example 2: Follow up: Could you do it in O(n) time and O(1) space? 思 阅读全文
posted @ 2020-03-29 22:54 littledy 阅读(64) 评论(0) 推荐(0) 编辑
摘要:Problem : Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any posit 阅读全文
posted @ 2020-03-29 22:33 littledy 阅读(84) 评论(0) 推荐(0) 编辑
摘要:Problem : Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice 阅读全文
posted @ 2020-03-29 21:55 littledy 阅读(76) 评论(0) 推荐(0) 编辑
摘要:Problem : Given an array of size n, find the majority element. The majority element is the element that appears more than times. You may assume that t 阅读全文
posted @ 2020-03-29 16:47 littledy 阅读(67) 评论(0) 推荐(0) 编辑
摘要:Problem : 思路 : Solution (C++) : 性能 : Runtime: 932 ms Memory Usage: 14.8 MB 思路 : Solution (C++) : 性能 : Runtime: ms Memory Usage: MB 阅读全文
posted @ 2020-03-29 16:32 littledy 阅读(75) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: 思路 : Solution (C++) : 性能 : 阅读全文
posted @ 2020-03-28 11:30 littledy 阅读(73) 评论(0) 推荐(0) 编辑
摘要:Problem : Given two binary strings, return their sum (also a binary string). The input strings are both non empty and contains only characters 1 or 0. 阅读全文
posted @ 2020-03-28 11:10 littledy 阅读(68) 评论(0) 推荐(0) 编辑
摘要:Problem : Implement . Compute and return the square root of x, where x is guaranteed to be a non negative integer. Since the return type is an integer 阅读全文
posted @ 2020-03-27 23:08 littledy 阅读(100) 评论(0) 推荐(0) 编辑
摘要:Problem : You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways 阅读全文
posted @ 2020-03-27 22:57 littledy 阅读(78) 评论(0) 推荐(0) 编辑
摘要:Problem : 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 sig 阅读全文
posted @ 2020-03-27 22:45 littledy 阅读(84) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a string s consists of upper/lower case alphabets and empty space characters ' ', return the length of last word (last word means the 阅读全文
posted @ 2020-03-27 22:20 littledy 阅读(115) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inse 阅读全文
posted @ 2020-03-27 20:35 littledy 阅读(96) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is va 阅读全文
posted @ 2020-03-27 19:32 littledy 阅读(176) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a 32 bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note: Assume we are dealing with an environmen 阅读全文
posted @ 2020-03-27 19:01 littledy 阅读(97) 评论(0) 推荐(0) 编辑
摘要:Problem : There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time com 阅读全文
posted @ 2020-03-27 18:17 littledy 阅读(119) 评论(0) 推荐(0) 编辑
摘要:Problem : You are given two non empty linked lists representing two non negative integers. The digits are stored in reverse order and each of their no 阅读全文
posted @ 2020-03-27 17:02 littledy 阅读(118) 评论(0) 推荐(0) 编辑
摘要:Problem : Implement strStr(). Return the index of the first occurrence of needle in haystack, or 1 if needle is not part of haystack. Example 1: Examp 阅读全文
posted @ 2020-03-26 00:20 littledy 阅读(107) 评论(0) 推荐(0) 编辑
摘要:Problem : Given an array nums and a value val, remove all instances of that value in place and return the new length. Do not allocate extra space for 阅读全文
posted @ 2020-03-25 23:56 littledy 阅读(117) 评论(0) 推荐(0) 编辑
摘要:Problem : Given a sorted array nums, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate 阅读全文
posted @ 2020-03-25 23:42 littledy 阅读(102) 评论(0) 推荐(0) 编辑
摘要:Problem : Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Example 2: E 阅读全文
posted @ 2020-03-25 22:40 littledy 阅读(92) 评论(0) 推荐(0) 编辑
摘要:Problem : Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string 阅读全文
posted @ 2020-03-25 21:53 littledy 阅读(95) 评论(0) 推荐(0) 编辑
摘要:Problem : Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists 阅读全文
posted @ 2020-03-25 21:15 littledy 阅读(112) 评论(0) 推荐(0) 编辑
摘要:什么是Linux 两层含义: 一种是Linus Benedict Torvalds编写的开源操作系统的内核 另一种是广义的操作系统 执行环境: 云主机 无数据的PC(不推荐多系统混跑) 虚拟机(推荐方式) 版本 内核版本 内核版本分为三个部分:主版本号、次版本号、末版本号;次版本号是奇数为开发版,偶 阅读全文
posted @ 2020-03-07 12:49 littledy 阅读(197) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示