自定义博客皮肤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

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

原创 linux线程初学之实现打字母功能

前言 近日开始了吾之线程学习,略有所得,与进程相比,其可多线程同时执行代码段的特性,实是魅力巨大。 窃以为编程学习如武艺修炼,学了招式不过两招实在不应该,故做一打字母,实践练习。主要思路 打字母功能最主要的地方是 “字母不停下落,若按下对应键,字母消失,且在上方出现新的字母,重复此过程”。 简而言之,就是在向屏幕输出信息时还需要实时接受用户按键,而这与我们之前学习的程序设计顺序

2015-07-26 06:59:20 1299

原创 linux文件管理小结之自定义more

1.more命令功能 more命令用于查看内容超过一屏的文本(类似于cat) 基本功能: 1.输入backspace :内容翻一屏 2.输入enter : 内容翻一行 3.输入q:退出 4.实时显示已读文件比例2.实现思路 从命令中获取需要操作的文件 打开文件:open(filename,O_RDONLY); 获取文件总行数: lseek(

2015-07-24 17:32:22 1036

原创 树状数组学习(一维)

算法描述 可以对给定序列进行查询和修改 查询:主要用来查询任意两位之间数据和 修改:修改单项数据值 时间复杂度:log(n)算法思想1.数组的构建 定义 数组C A C1 = A1 C2 = A1 + A2 C3 = A3 C4 = A1 + A2 + A3 + A4 C5 = A5 C6 =

2015-07-13 12:58:12 1012

原创 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 928

原创 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 600

原创 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 626

原创 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 835

原创 影院管理系统(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 644

原创 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 684

空空如也

空空如也

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

TA关注的人

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