原创 LeeCode(9) Palindrome Number C語言

題目: Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as for

原创 LeeCode(1) two sum C語言 C++版本

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may a

原创 LeeCode(4) Median of Two Sorted Arrays C語言版本

題目: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arr

原创 LeeCode(5) Longest Palindromic Substring C語言

題目: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1

原创 LeeCode(124) 二叉樹中的最大路徑和 C++

給定一個非空二叉樹,返回其最大路徑和。 本題中,路徑被定義爲一條從樹中任意節點出發,達到任意節點的序列。該路徑至少包含一個節點,且不一定經過根節點輸入: [1,2,3] 1 / \ 2 3 輸出: 6 思路: 對

原创 CentOS獲取內核源碼

CentOs 默認情況下是沒有內核源碼的,如果獲取,並部署在usr/src/kernel/ 文件夾下的話,可以直接運行 yum install kernel yum install kernel-devel yum inst

原创 LeeCode(7) Reverse Integer C語言

題目: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input

原创 LeeCode(3) Longest Substring Without Repeating Characters C語言

題目: Given a string, find the length of the longest substring without repeating characters. Example 1: Input: “abcab

原创 LeeCode(234) Palindrome Linked List C語言

題目: Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: In

原创 LeeCode(6) ZigZag Conversion C語言

題目: The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want t

原创 LeeCode(2) Add Two Numbers C語言 版本

題目: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in rever

原创 Leecode(8) String to Integer (atoi) C語言

題目: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters