Rotate Array
Given an array, rotate the array to the right by k steps, where k is non-negative.
(翻转数组)
Given an array, rotate the array to the right by k steps, where k is non-negative.
(翻转数组)
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most k transactions.
(股票收益)
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When studying DNA, it is sometimes useful to identify repeated sequences within the DNA. Write a function to find all the 10-letter-long sequences (substrings) that occur more than once in a DNA molecule.
(找出字符串中长度为10的重复出现的子串)
Given a list of non negative integers, arrange them such that they form the largest number.
(字符串拼接在一起为最大数)
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially positioned in the top-left room and must fight his way through the dungeon to rescue the princess.
(勇士解救公主需要的最低能量)
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST.
(设计二叉搜索树的迭代器)
Given an integer n, return the number of trailing zeroes in n!.
(求 n! 的末尾0的个数)
Given a column title as appear in an Excel sheet, return its corresponding column number.
(将EXCEL表格中的列名称转换成数值)
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element always exist in the array.
(众数(次数大于n/2))
意图识别 (Intent Classification) 和 槽位填充 (Slot Filling) 是自然语言理解 (Natural Language Understanding, NLU) 领域常见的两个子任务。意图识别可以看作一个分类任务,槽位填充则是一个序列标注问题,之前的模型往往是基于这两个任务构建两个模型来分别处理。最近提出了很多意图分类和槽位填充的联合学习模型,结合两个任务之间的依赖关系,提高了模型的效果。