自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

YiShi's Blog

new site -> https://shiyi.threebody.xyz

  • 博客(13)
  • 资源 (1)
  • 收藏
  • 关注

原创 leetcode 11 -- Container With Most Water

题目 Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find tw

2015-06-25 01:37:07 822

原创 leetcode 10 -- Regular Expression Matching

前言 初看到这道题,毫无思路,逃避好几天,看学长博客,才找到思路,即使这样,仍调试好大一会儿,刷题好痛苦。。。题目 Implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any single character. ‘*’ Matches zero or more of th

2015-06-24 00:38:15 1769

原创 leetcode 9 -- Palindrome Number

题目 Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to

2015-06-18 16:05:42 930

原创 leetcode 8 -- String to Integer (atoi)

题目 Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible in

2015-06-17 15:55:35 683

原创 leetcode 7 -- Reverse Integer

题目 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321题意 将整型数逆置,返回int 要考虑数据溢出 若溢出 返回 0 还有尾部有零的问题 如 x=1200 return 0021 吗?思路 按位将整数保存于数组,反向计

2015-06-17 02:32:17 706

原创 leetcode 6 -- ZigZag Conversion

题目 The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)题意 将字符串按照锯齿形(N字形)排列,然

2015-06-17 00:39:29 602

原创 leetcode 5 -- Longest Palindromic Substring

题目 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.题意 从字符串中找出最长回文子串,将其

2015-06-16 22:30:47 629

原创 leetcode 4 -- Median of Two Sorted Arrays

题目 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 complexity should be O(log (m+n)).题意 给定两有序数组,是否为空未知,升序降续未

2015-06-16 17:23:04 751

原创 leetcode 3 -- Longest Substring Without Repeating Characters

题目 Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the length is 3.

2015-06-16 15:20:41 838

原创 影院管理系统(GTK)

前言 补高数作业到现在也是醉了,索性不睡了,把前段时间做的课设整理一下,毕竟是小白,有什么地方有错误,还望大神不吝指出感触与收获 在写之前,本以为最大的难关是图形界面的构建,后来又认为是程序与文件的交互,最终完成后才明白,怎样不再庞大的代码堆中逻辑错乱才是最大的难关,而这就关系到下面几个问题了1.代码架构问题 刚开始写时,按以前习惯把全部代码全部写在了一个源文件里,随着代码越写越多,

2015-06-15 06:16:22 3254 3

原创 leetcode 2 -- Add Two Numbers

题目 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a

2015-06-15 02:11:37 646

原创 leetcode 1 -- Two Sum

前言 这道题做的真是一波三折…题目 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they a

2015-06-14 23:10:14 561

原创 leetcode 203 -- Remove Linked List Elements

前言 leetcode的第一道题,值得纪念一下题目 Remove all elements from a linked list of integers that have value val. Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5

2015-06-11 03:09:42 685

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除