Skip to content

Instantly share code, notes, and snippets.

View kenzhemir's full-sized avatar

Miras Kenzhegaliyev kenzhemir

  • Pipedrive
View GitHub Profile
/**
* 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}
/**
* @param {number} n
* @return {number}
*/
var countNumbersWithUniqueDigits = function(n) {
switch(n) {
case 0:
return 1;
case 1:
return 10;
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.
@kenzhemir
kenzhemir / cheatsheet.html
Created September 28, 2018 16:21
Краткий обзор HTML
<!DOCTYPE html> <!-- Указываем версию html для браузера (здесь HTML5) -->
<html> <!-- Начало html кода -->
<head> <!-- В этом теге будет вся "мета" информация о странице -->
<meta charset="utf8"> <!-- Тег отвечает за разную информацию о странице, например кодировка, размер экрана
или цвет закладки (в телефоне на некоторых сайтах закладка меняет цвет) -->
<title>Заголовок во вкладке браузера</title>
<link rel="stylesheet" type="text/css" media="screen" href="main.css" /> <!-- Подключаем CSS --->