本文翻译自 Simple Reinforcement Learning in Tensorflow: Part 1 - Two-armed Bandit, 作者是 Arthu...
本文翻译自 Simple Reinforcement Learning in Tensorflow: Part 1 - Two-armed Bandit, 作者是 Arthu...
题目 Given an unsorted integer array, find the first missing positive integer. For exampl...
题目 The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 2...
题目 Given a sorted array and a target value, return the index if the target is found. If...
题目 Given a linked list, reverse the nodes of a linked list k at a time and return its m...
题目 Given an array S of n integers, find three integers in S such that the sum is closes...
题目 Given an array S of n integers, are there elements a, b, c, and d in S such that a +...
题目 There are N children standing in a line. Each child is assigned a rating value. You ...
题目 Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined ...
题目 Given an integer array nums, find the sum of the elements between indices i and j (i...
题目 Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle contain...
题目 Given n non-negative integers representing the histogram's bar height where the widt...
题目 Given n non-negative integers representing an elevation map where the width of each ...
题目 Given n non-negative integers a1, a2, ..., an, where each represents a point at coor...
题目 Determine whether an integer is a palindrome. Do this without extra space. Some hint...
基本思想 将有n个元素的序列看成是n个长度为1的有序子序列,然后两两合并子序列,得到n/2个长度为2或1的有序子序列;再两两合并,直到得到一个长度为n的有序序列时结束。 解题之法
基本思想 将序列中第一个元素作为有序序列,然后将剩下的n-1个元素按照关键字大小依次插入该有序序列,每插入一个元素后依然保持该序列有序,经过n-1趟排序后,成为有序序列。 解...