This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* If I run it in Google Chrome Version 131.0.6778.205 (Official Build) (64-bit), it gives the following (unexpected) error: | |
* Uncaught SyntaxError: Private field '#C' must be declared in an enclosing class | |
* If I run it in Mozilla Firefox or Node.JS or online JS compilers, they all give (expected) error: | |
* SyntaxError: Identifier 'arg' has already been declared | |
*/ | |
class Example { | |
A() { | |
this.#C() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Definition for singly-linked list. | |
* function ListNode(val, next) { | |
* this.val = (val===undefined ? 0 : val) | |
* this.next = (next===undefined ? null : next) | |
* } | |
*/ | |
/** | |
* @param {ListNode} head | |
* @return {ListNode} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {number} n | |
* @return {number} | |
*/ | |
var countNumbersWithUniqueDigits = function(n) { | |
switch(n) { | |
case 0: | |
return 1; | |
case 1: | |
return 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. | |
Note: | |
The length of num is less than 10002 and will be ≥ k. | |
The given num does not contain any leading zero. | |
Example 1: | |
Input: num = "1432219", k = 3 | |
Output: "1219" | |
Explanation: Remove the three digits 4, 3, and 2 to form the new number 1219 which is the smallest. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> <!-- Указываем версию html для браузера (здесь HTML5) --> | |
<html> <!-- Начало html кода --> | |
<head> <!-- В этом теге будет вся "мета" информация о странице --> | |
<meta charset="utf8"> <!-- Тег отвечает за разную информацию о странице, например кодировка, размер экрана | |
или цвет закладки (в телефоне на некоторых сайтах закладка меняет цвет) --> | |
<title>Заголовок во вкладке браузера</title> | |
<link rel="stylesheet" type="text/css" media="screen" href="main.css" /> <!-- Подключаем CSS ---> |