-
Updated
Feb 24, 2020
interview
Here are 1,433 public repositories matching this topic...
-
Updated
Feb 24, 2020 - Java
-
Updated
Feb 24, 2020 - Java
There are some interesting algorithms in simulation from Physics, Chemistry, and Engineering especially regarding Monte Carlo simulation: Heat Bath algorithm, Metro-Police algorithm, Markov Chain Monte Carlo, etc.
I think it makes more sense to return an empty array
// invalid input return null or throw an error
if (!setA || !setB) {
return null;
}
if (!setA.length || !setB.length) {
return [];
}
// or do nothing since the for loop will not trigger anyway
- We have BFS and DFS images in both Breadth First Traversal and Depth First Traversal. We should have illustrations in the respective sections.
假如有一排房子,共 n 个,每个房子可以被粉刷成红色、蓝色或者绿色这三种颜色中的一种,你需要粉刷所有的房子并且使其相邻的两个房子颜色不能相同。
当然,因为市场上不同颜色油漆的价格不同,所以房子粉刷成不同颜色的花费成本也是不同的。每个房子粉刷成不同颜色的花费是以一个 n x 3 的矩阵来表示的。
例如,costs[0][0] 表示第 0 号房子粉刷成红色的成本花费;costs[1][2] 表示第 1 号房子粉刷成绿色的花费,以此类推。请你计算出粉刷完所有房子最少的花费成本。
注意:
所有花费均为正整数。
示例:
输入: [[17,2,17],[16,16,5],[14,3,19]]
输出: 10
解释: 将 0 号房子粉刷成蓝色,1 号房子粉刷成绿色,2 号房子粉刷成蓝色。
最少花费: 2 + 5 + 3 = 10。
题目地址: ht
-
Updated
Feb 24, 2020
https://mybinder.org/ Should I make a binder ? :) Or if there is a binder link, it's well hidden.
在ES5中,顶层对象的属性和全局变量是等价的,var 命令和 function 命令声明的全局变量,自然也是顶层对象。
var a = 12;
function f(){};
console.log(window.a); // 12
console.log(window.f); // f(){}
但ES6规定,var 命令和 function 命令声明的全局变量,依旧是顶层对象的属性,但 let命令、const命令、class命令声明的全局变量,不属于顶层对象的属性。
let aa = 1;
const bb = 2;
console.log(window.aa); // undefined
console.log(window.bb); // undefined
在哪里?怎么获取?通过在设置断点,看看浏览器是
-
Updated
Feb 24, 2020 - JavaScript
-
Updated
Feb 24, 2020
-
Updated
Feb 24, 2020 - Python
-
Updated
Feb 24, 2020 - JavaScript
-
Updated
Feb 24, 2020 - C++
-
Updated
Feb 24, 2020
-
Updated
Feb 24, 2020 - Java
-
Updated
Feb 24, 2020 - JavaScript
-
Updated
Feb 24, 2020 - JavaScript
-
Updated
Feb 24, 2020
-
Updated
Feb 24, 2020 - PHP
-
Updated
Feb 24, 2020 - Jupyter Notebook
🚀 Feature Proposal
Adding leading zero in the question number will be an awesome feature for file explorer to sort files by the name.
-
Updated
Feb 24, 2020 - JavaScript
## Python/Regex fix
This is a reminder for me or a task if anyone wants :P
Basically, The last two questions aren't really regex's questions.
To do:
- Move said questions to correct place.
- Add new regex questions (Python related!)?
- Maybe add a new ## Regex section, as it is a valuable skill
-
Updated
Feb 23, 2020 - Swift
Improve this page
Add a description, image, and links to the interview topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the interview topic, visit your repo's landing page and select "manage topics."
A description is incomplete. It should mention:
These patterns are not competing, but complementing each other. To achieve availability, one needs both fail-over and replication.
right after
"There are two main patterns to support high availability: fail-over and replication. "