Feibai Blog

一生想做浪漫极客

Ubuntu+CUDA Installation Guide

A basic memo when I install CUDA8.0 on my Ubuntu

Here are the basic step of installing the CUDA-8.0 driver and toolkit on Ubuntu 16.04 My Device: DELL XPS 15 9550 OS: Windows 10 Home + Ubuntu 16.04 Graphics: GTX 960M + Intel HD something CUDA...

LeetCode 刷题笔记

7. Reverse Integer

Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Solution 1: Direct Reverse Construct the new number directly take care of sign using long long i...

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) P A H N A P L S I...

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. Example: Input: “babad” Output: “bab” Note: “aba” is also a valid answer. Exa...

LeetCode 刷题笔记

4.Longest Substring Without Repeating Characters

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)). Example 1: nums1 = [1, ...

LeetCode 刷题笔记

3.Longest Substring Without Repeating Characters

Introduction: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the length is 3. Given "bbbbb", the a...

LeetCode 刷题笔记

2.Add Two Numbers

Introduction You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num...

Kotlin学习笔记(一):安装

Kotlin笔记

最近Kotlin语言突然变得很火,主要原因是因为Google在I/O 2017上宣布Kotlin正式成为Android开发语言。因此对这一们新兴语言很是好奇,这一系列学习笔记是作者边学边写的。 安装 Kotlin依然是基于JVM的,因此首先需要安装JDK,安装地址在这里,安装完之后可能需要在Path中配置环境变量信息,可以参考这篇文章。 之后是安装Kotlin的IDE,这里我使用了In...

LeetCode 刷题笔记

1.Two Sum

Introduction Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may ...

使用Haskell实现Lisp解释器

编译原理学习笔记

在翻了几章SICP之后,一直想试着实现一个Lisp解释器,在自己读master的第一年曾经试着实现了一个Lisp的子集编译器(没有看过编译原理,纯粹是凭感觉实现的,代码惨不忍睹=_=!),在学完Haskell以后,一直想找一个可以练手的项目,看到了这篇文章,就顺便翻译一下吧。 简介 不久前,在看了一堆有关Haskell的文章之后,我终于越过了理论并安装了一个Haskell编译器。我决定通...