原创 [Leetcode]2.Add Two Numbers

題目鏈接:https://leetcode.com/problems/add-two-numbers/ You are given two linked lists representing two non-negative nu

原创 DL學習--GAN

簡介 生成式對抗網絡,主要介紹三篇論文:1)Generative Adversarial Networks;2)Conditional Generative Adversarial Nets;3)Unsupervised Repr

原创 [leetcode]1.Two Sum

題目鏈接:https://leetcode.com/problems/two-sum/ Given an array of integers, find two numbers such that they add up to a

原创 面試--求數組,左邊的數都小於等於它,右邊的數都大於等於它

題目 在一個 int 數組裏查找這樣的數,它大於等於左側所有數,小於等於右側所有數。直觀想法是用兩個數組 a、b。a[i]、b[i]分別保存從前到 i 的最大的數和從後到 i 的最小的數,一個解答:這需要兩次遍歷,然後再遍歷

原创 程序設計基礎及數據結構基礎

基本概念 C++內置類型 內置的C++類型分兩組,基本類型和複合類型。基本類型包括整數、浮點數及兩者的多種變體。複合類型包括數組、字符串、指針、引用、結構體和共用體等。 C++的基本整型 按寬度遞增的順序排列,分別是char

原创 [leetcode] 3. Longest Substring Without Repeating Characters

題目鏈接:https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length

原创 數據結構--字符串

字符串與子串、子序列 C/C++標準庫提供的字符串處理函數 strlen() 返回s的長度,不包括字符串結束符null strcmp(s1,s2) 比較兩個字符串s1和s2是否相同。若s1與s2星等,返回1,若s1大於

原创 [leetcode] 5. Longest Palindromic Substring

題目鏈接:https://leetcode.com/problems/longest-palindromic-substring/ Given a string S, find the longest palindromic su

原创 面試-劍指offer-數組中出現次數超過一半的數字

題目 數組中有一個數字出現的次數超過數組長度的一般,請找出這個數字。 思路 解法一:基於Partition函數的O(n)算法 數組中有一個數字出現的次數超過了數組長度的一般。如果把這個數組排序,那麼排序之後位於數組中間的數字一定

原创 [leetcode] 4. Median of Two Sorted Arrays

題目鏈接: https://leetcode.com/problems/median-of-two-sorted-arrays/ There are two sorted arrays nums1 and nums2 of s

原创 [leetcode] 14. Longest Common Prefix[leetcode] 14. Longest Common Prefix

題目鏈接:https://leetcode.com/problems/longest-common-prefix/ Write a function to find the longest common prefix string

原创 [leetcode] 13. Roman to Integer

題目鏈接:https://leetcode.com/problems/roman-to-integer/ Given a roman numeral, convert it to an integer. Input is guar

原创 [leetcode] 20. Valid Parentheses

題目鏈接:https://leetcode.com/problems/valid-parentheses/ Given a string containing just the characters ‘(‘, ‘)’, ‘{‘,

原创 TensorFlow(一):基本操作

配置TensorFlow,官方教程:https://www.tensorflow.org/get_started/os_setup 安裝了GPU版本的TensorFlow,還需要配置Cuda,關於Cuda安裝看這裏:https:

原创 [leetcode] 7. Reverse Integer

題目鏈接:https://leetcode.com/problems/reverse-integer/ Reverse digits of an integer. Example1: x = 123, return 321 Ex