Leetcode: Online programming Website-written test questions for major IT companies

Source: Internet
Author: User
Tags multiply strings rotate image

Leetcode is an American online programming website, which mainly collects the written interview questions of major IT companies, and it is a rare and good helper to find a job for fresh graduates.

The advantage of this website is that it will tell you the test data and your output and the correct output is what, convenient for everyone to debug learning. Currently, only C + + and Java two languages are supported.

In addition, it supports online editing and provides an online operating environment that can directly see the results of the operation.

Another good place is to provide 2 separate code windows, compiled and run separately. A development window of their own play, a window to submit code, you can test the first window in a variety of uncertain function points.

Official website: http://leetcode.com/


Https://github.com/soulmachine/leetcode

Http://blog.csdn.net/column/details/leetcode-solution.html


Leetcode PDF Download

Leetcode (c + + edition). pdf

C + + folder under the C + + version, the same content, the code is written in C + +,

Java folder under the Java version, the same content, the code is written in Java latex template

This book uses the Chen Yu Open source template. This template is well made and taste, thanks to Chen Yu:) Compile and install the Tex Live 2013 http://www.tug.org/texlive/ under Windows . Add the bin directory, such as D:\texlive\2013\bin\win32, to the PATH environment variable. Install fonts. The latex template uses a total of 9 fonts, download address Http://pan.baidu.com/s/1gdefYiJ, some fonts with Windows, and some fonts Ubuntu comes with, but not all, or a one-time installation of all fonts more convenient. Install Texstudio http://texstudio.sourceforge.net/(optional) to start the Tex Live Manager and update all installed packages.

Configure Texstudio.

Start Texstudio, select Options-->configure Texstudio-->commands,xelatex set to xelatex-synctex=1-interaction= Nonstopmode%.tex;

Select Options-->configure texstudio-->build

Build & View change from default PDF Chain to Compile & View;

Default Compiler is modified by the Pdflatex to Xelatex;

The PDF viewer is changed to "Internal PDF viewer (windowed)" so that the preview will pop up a separate window, which is more convenient.

Compile. With Texstudio open Leetcode-cpp.tex, click on the green arrows on the interface to start compiling.

At the bottom of the window you can see that the compile command that Texstudio is using is Xelatex-synctex=1-interaction=nonstopmode "Leetcode-cpp". Tex compiles under Ubuntu

Install the Tex Live 2013 http://www.tug.org/texlive/

1.1. Download Texlive 2013 's ISO CD, address http://www.tug.org/texlive/acquire-iso.html

1.2 Mount CD, sudo./install-tl start Installation

1.3 Adding environment variables

sudo vi/etc/profile
export path= $PATH:/usr/local/texlive/2013/bin/x86_64-linux
export manpath= $MANPATH:/ Usr/local/texlive/2013/texmf-dist/doc/man
export infpath= $INFPATH:/usr/local/texlive/2013/texmf-dist/doc/ Info

Install fonts. The latex template uses a total of 9 fonts, download address Http://pan.baidu.com/s/1gdefYiJ, some fonts with Windows, and some fonts Ubuntu comes with, but not all, or a one-time installation of all fonts more convenient. Install Texstudio http://texstudio.sourceforge.net/

Configure Texstudio.

Start Texstudio, select Options-->configure Texstudio-->commands,xelatex set to xelatex-synctex=1-interaction= Nonstopmode%.tex;

Select Options-->configure texstudio-->build

Build & View change from default PDF Chain to Compile & View;

Default Compiler is modified by the Pdflatex to Xelatex;

The PDF viewer is changed to "Internal PDF viewer (windowed)" so that the preview will pop up a separate window, which is more convenient.

Compile. With Texstudio open Leetcode-cpp.tex, click on the green arrows on the interface to start compiling.

At the bottom of the window you can see that the compilation command that Texstudio is using is Xelatex-synctex=1-interaction=nonstopmode "Leetcode-cpp". Tex lazy version of the mirror. If you do not want to do the above cumbersome installation process, I made an Ubuntu VMware virtual machine image, has installed the Texlive 2013, Texstudio and fonts (detailed installation log see compressed package notes), out-of-the-box, download the address http:// Pan.baidu.com/s/1jgj5uqi. How to contribute code

After compiling, we have a complete latex compilation environment.

This book template has been written well, basically do not need a lot of latex knowledge can be done.

Welcome to the Book add content or correct errors, in their own local compiled into a PDF, preview no problem, you can send pull request came. North American Job search microblogging group

Me and my little friends are here: http://q.weibo.com/1312378


Topic Algorithm Data Attention matters
Clone Graph BFS Hash table
Word Ladder II BFS Hash table
Surrounded regions BFS Matrix
Word Ladder BFS N/A
Binary Tree Level Order traversal bfs| Pre-sequence traversal Queue
Binary Tree Level order traversal II bfs| Pre-sequence traversal Queue
Binary tree zigzag level order traversal bfs| Pre-sequence traversal Queue Each level of order is treated separately
Implement STRSTR () KMP algorithm N/A
Copy List with Random pointer N/A Hash table
Remove Duplicates from Sorted Array N/A Hash table
Remove duplicates from Sorted Array II N/A Hash table
Set Matrix Zeroes N/A Hash table
Anagrams N/A Hash table
Missing Positive N/A Hash table
Two Sum N/A Hash table
Evaluate Reverse Polish notation N/A Stack
Largest Rectangle in histogram N/A Stack Record important positions
Minimum Window Substring N/A Stack
Simplify Path N/A Stack
Longest Valid parentheses N/A Stack
Valid parentheses N/A Stack Lexical analysis
Container with Most Water N/A Stack Record important positions
Reverse Words in a String N/A Stack Flip a string
Sell Stock N/A Array
best time to buy and Sell the stock II N/A Array
best time to buy and Sell stock III N/A Array
Length of last Word N/A Array
Search Insert Position N/A Array
Search for a Range N/A Array
Spiral Matrix N/A Matrix Simplify to child issues
Spiral Matrix II N/A Matrix Simplify to child issues
LRU Cache N/A Linked list
Reorder List N/A Linked list Speed pointer & Reverse link
Linked List Cycle N/A Linked list Speed pointer
Linked List Cycle II N/A Linked list Speed pointer
Reverse linked List II N/A Linked list
Partition List N/A Linked list
Remove Duplicates from Sorted List N/A Linked list
Remove duplicates from Sorted List II N/A Linked list
Merge two Sorted Lists N/A Linked list
Rotate List N/A Linked list Speed pointer
Reverse Nodes in K-group N/A Linked list
Swap Nodes in pairs N/A Linked list
Remove nth Node from end of List N/A Linked list Speed pointer
Text Justification N/A Queue
Candy N/A N/A Simplify to child issues
Valid palindrome N/A N/A End pointer
Plus One N/A N/A Analog addition operations
Valid number N/A N/A Lexical analysis
ADD Binary N/A N/A Analog addition operations
Insert Interval N/A N/A
Merge intervals N/A N/A
Multiply Strings N/A N/A Analog multiplication operations
Trapping Rain Water N/A N/A
Valid Sudoku N/A N/A
Roman to Integer N/A N/A
Integer to Roman N/A N/A
Palindrome number N/A N/A
Reverse Integer N/A N/A
Zigzag conversion N/A N/A
ADD two Numbers N/A N/A Analog addition operations
Median of two Sorted Arrays N/A N/A
String to Integer (atoi) STL function N/A
Next permutation STL Classical algorithm N/A
Recover Binary Search Tree In-sequence traversal Two fork Tree
3Sum Two-point Search N/A
3Sum closest Two-point Search N/A
4Sum Two-point Search N/A
Single number Bit operations N/A
Single II Bit operations N/A
Construct Binary tree from preorder and inorder traversal Sequential traversal in sequence N/A
Binary Tree Preorder Traversal Pre-sequence traversal Two fork Tree
Flatten Binary tree to linked List Pre-sequence traversal Two fork Tree
Interleaving String Dynamic programming Two fork Tree
Unique Binary Search Trees Dynamic programming Two fork Tree
Word break Dynamic programming N/A
Word Break II Dynamic programming N/A
Palindrome Partitioning Dynamic programming N/A
Palindrome Partitioning II Dynamic programming N/A
Triangle Dynamic programming N/A
Distinct subsequences Dynamic programming N/A
Decode Ways Dynamic programming N/A
Scramble String Dynamic programming N/A
Maximal Rectangle Dynamic programming N/A
Edit Distance Dynamic programming N/A
Climbing stairs Dynamic programming N/A
Minimum Path Sum Dynamic programming N/A
Unique Paths Dynamic programming N/A
Unique Paths II Dynamic programming N/A
Jump Game Dynamic programming N/A
Jump Game II Dynamic programming N/A
Maximum Subarray Dynamic programming N/A
Wildcard Matching Dynamic programming N/A
Substring with concatenation of all Words Dynamic programming N/A
Sort List Merge sort Linked list Speed pointer
Merge Sorted Array Merge sort N/A
Construct Binary tree from inorder and postorder traversal Sequential traversal in sequence N/A
Binary Tree Postorder Traversal Subsequent traversal Two fork Tree
Combinations Backtracking N/A
Permutation Sequence Backtracking N/A
N-queens Backtracking N/A
N-queens II Backtracking N/A
Permutations Backtracking N/A
Permutations II Backtracking N/A
Combination Sum Backtracking N/A
Combination Sum II Backtracking N/A
Sudoku Solver Backtracking N/A
Longest Substring without repeating Characters Backtracking N/A
Max Points on a line Loop traversal N/A Exclude the same point
Longest Common Prefix Loop traversal N/A
Longest palindromic Substring Loop traversal N/A
Insertion Sort List Insert Sort Linked list
Rotate Image Vector rotation and translation N/A
Longest consecutive Sequence Class BFS Hash table
Search in rotated Sorted Array Class Two-point lookup N/A
Search in rotated Sorted Array II Class Two-point lookup N/A Special considerations Equal Data
SQRT (x) Class Two-point lookup N/A
Pow (x, N) Class binary N/A
Divide two integers Class binary N/A
Gas station Class Merge sort N/A
Merge k Sorted Lists Sort outside of class N/A
Sort Colors Class Quick Sort N/A
Remove Element Class Quick Sort N/A
Search a 2D Matrix The young matrix of class N/A
Restore IP Addresses Knapsack problem N/A
Sum Root to Leaf Numbers Recursion Two fork Tree
Binary Tree Maximum Path Sum Recursion Two fork Tree
Opulating Next Right pointers in each Node Recursion Two fork Tree
Populating Next right pointers into each Node II Recursion Two fork Tree
Path Sum Recursion Two fork Tree
Path Sum II Recursion Two fork Tree
Maximum Depth of Binary Tree Recursion Two fork Tree
Minimum Depth of Binary Tree Recursion Two fork Tree
Balanced Binary Tree Recursion Two fork Tree
Symmetric tree Recursion Two fork Tree
Same Tree Recursion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.