世界那么大 我想去看看
或者 Feedburner分类: 所有 | 乱七八糟(55) | 计算机科学(175) | 生活(35) | 成功(21) | 有意思(25) | 怀念(4) | 分享(63) | 情与爱(17) | 新闻资讯(96) | 名人名言(92) | 知识问答(26) | 健康(7) | 图片(5) | 故事(6) | 视频(13) | 虚拟货币-区块链(6) | 人工智能(3) |
17 - 每日算法题: Multitasking - multitasking.txt
Hi, here's your problem today. This problem was recently asked by AirBNB:
We have a list of tasks to perform, with a cooldown period. We can do multiple of these at the same time, but we cannot run the same task simultaneously.
Given a list of tasks, find how long it will take to complete the tasks in the order they are input.
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 70480 次阅读, 30930 次搜索 | 77 个单词
Hi, here's your problem today. This problem was recently asked by AirBNB:
We have a list of tasks to perform, with a cooldown period. We can do multiple of these at the same time, but we cannot run the same task simultaneously.
Given a list of tasks, find how long it will take to complete the tasks in the order they are input.
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 70480 次阅读, 30930 次搜索 | 77 个单词
18 - 每日算法题: Sort a Partially Sorted List - sort-a-partially-sorted-list.txt
Hi, here's your problem today. This problem was recently asked by Uber:
You are given a list of n numbers, where every number is at most k indexes away from its properly sorted index. Write a sorting algorithm (that will be given the number k) for this list that can solve this in O(n log k)
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 66879 次阅读, 33124 次搜索 | 93 个单词
Hi, here's your problem today. This problem was recently asked by Uber:
You are given a list of n numbers, where every number is at most k indexes away from its properly sorted index. Write a sorting algorithm (that will be given the number k) for this list that can solve this in O(n log k)
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 66879 次阅读, 33124 次搜索 | 93 个单词
19 - 每日算法题: Most Frequent Subtree Sum - most-frequent-subtree-sum.txt
Hi, here's your problem today. This problem was recently asked by LinkedIn:
Given a binary tree, find the most frequent subtree sum.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 68975 次阅读, 33468 次搜索 | 147 个单词
Hi, here's your problem today. This problem was recently asked by LinkedIn:
Given a binary tree, find the most frequent subtree sum.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 68975 次阅读, 33468 次搜索 | 147 个单词
20 - 每日算法题: Fix Brackets - fix-brackets.txt
Hi, here's your problem today. This problem was recently asked by Twitter:
Given a string with only ( and ), find the minimum number of characters to add or subtract to fix the string such that the brackets are balanced.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 70676 次阅读, 30485 次搜索 | 99 个单词
Hi, here's your problem today. This problem was recently asked by Twitter:
Given a string with only ( and ), find the minimum number of characters to add or subtract to fix the string such that the brackets are balanced.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 70676 次阅读, 30485 次搜索 | 99 个单词
21 - 每日算法题: Palindrome Integers - palindrome-integers.txt
Hi, here's your problem today. This problem was recently asked by Twitter:
Given an integer, check if that integer is a palindrome. For this problem do not convert the integer to a string to check if it is a palindrome.
import math
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 68783 次阅读, 31882 次搜索 | 57 个单词
Hi, here's your problem today. This problem was recently asked by Twitter:
Given an integer, check if that integer is a palindrome. For this problem do not convert the integer to a string to check if it is a palindrome.
import math
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 68783 次阅读, 31882 次搜索 | 57 个单词
22 - 每日算法题: Print a tree level-by-level, with line-breaks - print-a-tree-level-by-level,-with-line-breaks.txt
Hi, here's your problem today. This problem was recently asked by Apple:
You are given a tree, and your job is to print it level-by-level with linebreaks.
a
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67625 次阅读, 49365 次搜索 | 111 个单词
Hi, here's your problem today. This problem was recently asked by Apple:
You are given a tree, and your job is to print it level-by-level with linebreaks.
a
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67625 次阅读, 49365 次搜索 | 111 个单词
23 - 每日算法题: Spreadsheet Columns - spreadsheet-columns.txt
Hi, here's your problem today. This problem was recently asked by Apple:
In many spreadsheet applications, the columns are marked with letters. From the 1st to the 26th column the letters are A to Z. Then starting from the 27th column it uses AA, AB, ..., ZZ, AAA, etc.
Given a number n, find the n-th column name.
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 71096 次阅读, 34771 次搜索 | 80 个单词
Hi, here's your problem today. This problem was recently asked by Apple:
In many spreadsheet applications, the columns are marked with letters. From the 1st to the 26th column the letters are A to Z. Then starting from the 27th column it uses AA, AB, ..., ZZ, AAA, etc.
Given a number n, find the n-th column name.
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 71096 次阅读, 34771 次搜索 | 80 个单词
24 - 每日算法题: Generate All IP Addresses - generate-all-ip-addresses.txt
i, here's your problem today. This problem was recently asked by Microsoft:
An IP Address is in the format of A.B.C.D, where A, B, C, D are all integers between 0 to 255.
Given a string of numbers, return the possible IP addresses you can make with that string by splitting into 4 parts of A, B, C, D.
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67598 次阅读, 32598 次搜索 | 99 个单词
i, here's your problem today. This problem was recently asked by Microsoft:
An IP Address is in the format of A.B.C.D, where A, B, C, D are all integers between 0 to 255.
Given a string of numbers, return the possible IP addresses you can make with that string by splitting into 4 parts of A, B, C, D.
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67598 次阅读, 32598 次搜索 | 99 个单词
25 - 每日算法题: Consecutive Ones - consecutive-ones.txt
Hi, here's your problem today. This problem was recently asked by Microsoft:
Return the longest run of 1s for a given integer n's binary representation.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67902 次阅读, 28741 次搜索 | 52 个单词
Hi, here's your problem today. This problem was recently asked by Microsoft:
Return the longest run of 1s for a given integer n's binary representation.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67902 次阅读, 28741 次搜索 | 52 个单词
26 - 每日算法题: Spreadsheet Column Title - spreadsheet-column-title.txt.txt
Hi, here's your problem today. This problem was recently asked by Amazon:
MS Excel column titles have the following pattern: A, B, C, ..., Z, AA, AB, ..., AZ, BA, BB, ..., ZZ, AAA, AAB, ... etc. In other words, column 1 is named "A", column 2 is "B", column 26 is "Z", column 27 is "AA" and so forth. Given a positive integer, find its corresponding column name.
Examples:
Input: 26
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67405 次阅读, 34031 次搜索 | 116 个单词
Hi, here's your problem today. This problem was recently asked by Amazon:
MS Excel column titles have the following pattern: A, B, C, ..., Z, AA, AB, ..., AZ, BA, BB, ..., ZZ, AAA, AAB, ... etc. In other words, column 1 is named "A", column 2 is "B", column 26 is "Z", column 27 is "AA" and so forth. Given a positive integer, find its corresponding column name.
Examples:
Input: 26
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67405 次阅读, 34031 次搜索 | 116 个单词
27 - 每日算法题: Compare Version Numbers - compare-version-numbers.txt
Hi, here's your problem today. This problem was recently asked by Amazon:
Version numbers are strings that are used to identify unique states of software products. A version number is in the format a.b.c.d. and so on where a, b, etc. are numeric strings separated by dots. These generally represent a hierarchy from major to minor changes. Given two version numbers version1 and version2, conclude which is the latest version number. Your code should do the following:
If version1 > version2 return 1.
If version1 < version2 return -1.
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67382 次阅读, 30314 次搜索 | 192 个单词
Hi, here's your problem today. This problem was recently asked by Amazon:
Version numbers are strings that are used to identify unique states of software products. A version number is in the format a.b.c.d. and so on where a, b, etc. are numeric strings separated by dots. These generally represent a hierarchy from major to minor changes. Given two version numbers version1 and version2, conclude which is the latest version number. Your code should do the following:
If version1 > version2 return 1.
If version1 < version2 return -1.
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67382 次阅读, 30314 次搜索 | 192 个单词
28 - 每日算法题: Reverse a Directed Graph - reverse-a-directed-graph.txt
Hi, here's your problem today. This problem was recently asked by Facebook:
Given a directed graph, reverse the directed graph so all directed edges are reversed.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 69424 次阅读, 31698 次搜索 | 115 个单词
Hi, here's your problem today. This problem was recently asked by Facebook:
Given a directed graph, reverse the directed graph so all directed edges are reversed.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 69424 次阅读, 31698 次搜索 | 115 个单词
29 - 每日算法题: Absolute Path - absolute-path.txt
Hi, here's your problem today. This problem was recently asked by Facebook:
Given a file path with folder names, '..' (Parent directory), and '.' (Current directory), return the shortest possible file path (Eliminate all the '..' and '.').
Example
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 70444 次阅读, 33103 次搜索 | 78 个单词
Hi, here's your problem today. This problem was recently asked by Facebook:
Given a file path with folder names, '..' (Parent directory), and '.' (Current directory), return the shortest possible file path (Eliminate all the '..' and '.').
Example
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 70444 次阅读, 33103 次搜索 | 78 个单词
30 - 每日算法题: Design Tic-Tac-Toe - design-tic-tac-toe.txt
Hi, here's your problem today. This problem was recently asked by Google:
Design a Tic-Tac-Toe game played between two players on an n x n grid. A move is guaranteed to be valid, and a valid move is one placed on an empty block in the grid. A player who succeeds in placing n of their marks in a horizontal, diagonal, or vertical row wins the game. Once a winning condition is reached, the game ends and no more moves are allowed. Below is an example game which ends in a winning condition:
Given n = 3, assume that player 1 is "X" and player 2 is "O"
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67641 次阅读, 28163 次搜索 | 261 个单词
Hi, here's your problem today. This problem was recently asked by Google:
Design a Tic-Tac-Toe game played between two players on an n x n grid. A move is guaranteed to be valid, and a valid move is one placed on an empty block in the grid. A player who succeeds in placing n of their marks in a horizontal, diagonal, or vertical row wins the game. Once a winning condition is reached, the game ends and no more moves are allowed. Below is an example game which ends in a winning condition:
Given n = 3, assume that player 1 is "X" and player 2 is "O"
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 67641 次阅读, 28163 次搜索 | 261 个单词
31 - 每日算法题: Top K Frequent words - top-k-frequent-words.txt
Hi, here's your problem today. This problem was recently asked by AirBNB:
Given a non-empty list of words, return the k most frequent words. The output should be sorted from highest to lowest frequency, and if two words have the same frequency, the word with lower alphabetical order comes first. Input will contain only lower-case letters.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 68257 次阅读, 29274 次搜索 | 102 个单词
Hi, here's your problem today. This problem was recently asked by AirBNB:
Given a non-empty list of words, return the k most frequent words. The output should be sorted from highest to lowest frequency, and if two words have the same frequency, the word with lower alphabetical order comes first. Input will contain only lower-case letters.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 68257 次阅读, 29274 次搜索 | 102 个单词
32 - 每日算法题: Detect Linked List Cycle - detect-linked-list-cycle.txt
Hi, here's your problem today. This problem was recently asked by Uber:
Given a linked list, determine if the linked list has a cycle in it. For notation purposes, we use an integer pos which represents the zero-indexed position where the tail connects to.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 68379 次阅读, 32985 次搜索 | 120 个单词
Hi, here's your problem today. This problem was recently asked by Uber:
Given a linked list, determine if the linked list has a cycle in it. For notation purposes, we use an integer pos which represents the zero-indexed position where the tail connects to.
Example:
...
阅读全文>>
Top | 类别: 计算机科学 | 评论 (0) | 标签: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | 英文 | 68379 次阅读, 32985 次搜索 | 120 个单词
分类: 所有 | 乱七八糟(55) | 计算机科学(175) | 生活(35) | 成功(21) | 有意思(25) | 怀念(4) | 分享(63) | 情与爱(17) | 新闻资讯(96) | 名人名言(92) | 知识问答(26) | 健康(7) | 图片(5) | 故事(6) | 视频(13) | 虚拟货币-区块链(6) | 人工智能(3) |
©2006~2026 牛排过熟 - 0.01352 秒 - 3554.098 KB/s - 555 在线
内存: 529.13 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - 服务器 PHP 版本号: 7.4.33
牛排怎么做才好吃? | <meta name="机器人" content="不索引, 跟踪" />
内存: 529.13 KB18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - 服务器 PHP 版本号: 7.4.33
