Yi Shi's Blog
  • 首页
  • 归档
  • 分类
  • 标签
  • 读书
  • 关于
  •   
  •   

leetcode 7 -- Reverse Integer

** 题目 ** Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 ** 题意 ** 将整型数逆置,返回int要考虑数据溢出 若溢出 返回 0还有尾部有零的问题 如 x=1200 return 0021 吗? ** 思路 ** 若为负,先标记并转为正
2015-06-17
大学时期CSDN
#LeetCode

leetcode 6 -- ZigZag Conversion

** 题目 ** The string “PAYPALISHIRING” is written in a zigzag pattern on a given numberof rows like this: (you may want to display this pattern in a fixed font forbetter legibility) ** 题意 ** 将字符串按照锯齿
2015-06-17
大学时期CSDN
#LeetCode

leetcode 5 -- Longest Palindromic Substring

** 题目 ** Given a string S, find the longest palindromic substring in S. You mayassume that the maximum length of S is 1000, and there exists one uniquelongest palindromic substring. ** 题意 ** 从字符串中找
2015-06-16
大学时期CSDN
#LeetCode

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 complexityshould be O(log (m+n)). ** 题意 ** 给定两有序数组,是
2015-06-16
大学时期CSDN
#LeetCode

leetcode 3 -- Longest Substring Without Repeating Characters

** 题目 ** Given a string, find the length of the longest substring without repeatingcharacters. For example, the longest substring without repeating letters for“abcabcbb” is “abc”, which the length is
2015-06-16
大学时期CSDN
#LeetCode

影院管理系统(GTK)

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

leetcode 2 -- Add Two Numbers

** 题目 ** You are given two linked lists representing two non-negative numbers. Thedigits are stored in reverse order and each of their nodes contain a singledigit. Add the two numbers and return it a
2015-06-15
大学时期CSDN
#LeetCode

leetcode 1 -- Two Sum

** 前言 ** 这道题做的真是一波三折… ** 题目 ** Given an array of integers, find two numbers such that they add up to aspecific target number. The function twoSum should return indices of the two numbers such t
2015-06-14
大学时期CSDN
#LeetCode

leetcode 203 -- Remove Linked List Elements

** 前言 ** leetcode的第一道题,值得纪念一下 ** 题目 ** Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6Return: 1
2015-06-11
大学时期CSDN
#LeetCode
1…789

搜索

陕ICP备16019529号-2