Not Only Algorithm,不仅仅是算法,关注数学、算法、数据结构、程序员笔试面试以及一切涉及计算机编程之美的内容 。。

Leetcode Reverse Integer

Leetcode algorithms 第 7 题:Reverse Integer

继续阅读»

Leetcode ZigZag Conversion

Leetcode algorithms 第 6 题:ZigZag Conversion。

继续阅读»

Leetcode Longest Palindromic Substring

Leetcode algorithms 第 5 题:Longest Palindromic Substring。

继续阅读»

Leetcode Median of Two Sorted Arrays

Leetcode algorithms 第 4 题:Median of Two Sorted Arrays。

继续阅读»

Leetcode Longest Substring Without Repeating Characters

Leetcode algorithms 第 3 题:Longest Substring Without Repeating Characters。

继续阅读»

Leetcode Add Two Numbers

Leetcode algorithms 第 2 题: Add Two Numbers。

继续阅读»

Leetcode Two Sum

Leetcode algorithms 第 1 题: Two Sum。

继续阅读»

PAT 1091. Acute Stroke

One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice, your job is to calculate the volume of the stroke core.

继续阅读»

PAT 1090. Highest Price in Supply Chain

A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)– everyone involved in moving a product from supplier to customer.

继续阅读»

PAT 1089. Insert or Merge

According to Wikipedia:

Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the location it belongs within the sorted list, and inserts it there. It repeats until no input elements remain.

继续阅读»

PAT 1088. Rational Arithmetic

For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.

继续阅读»

PAT 1087. All Roads Lead to Rome

Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.

继续阅读»

PAT 1086. Tree Traversals Again

An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the stack operations are: push(1); push(2); push(3); pop(); pop(); push(4); pop(); pop(); push(5); push(6); pop(); pop(). Then a unique binary tree (shown in Figure 1) can be generated from this sequence of operations. Your task is to give the postorder traversal sequence of this tree.

继续阅读»

PAT 1085. Perfect Sequence

Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M <= m * p where M and m are the maximum and minimum numbers in the sequence, respectively.

继续阅读»

PAT 1084. Broken Keyboard

On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.

Now given a string that you are supposed to type, and the string that you actually type out, please list those keys which are for sure worn out.

继续阅读»

分页: 第一页 «上一页 4567891011121314 下一页 » 最后一页

我的博客

NoAlGo头像编程这件小事牵扯到太多的知识,很容易知其然而不知其所以然,但真正了不起的程序员对自己程序的每一个字节都了如指掌,要立足基础理论,努力提升自我的专业修养。

站内搜索

最新评论