C#.TelegramCommands.LearnEngine
How to send message from code ?
await _telegramBotClient.SendTextMessageAsync(chatId, text: «this is start command»);
Simple command handler for /start command. You can use
Algo. Minimum Number of Operations to Move All Balls to Each Box
You have n boxes. You are given a binary string boxes of length n, where boxes[i] is ‘0’ if the ith box is empty, and ‘1’ if it contains one ball.
In one operation, you can move one ball from a
Algo. Group the People Given the Group Size They Belong To
There are n people that are split into some unknown number of groups. Each person is labeled with a unique ID from 0 to n — 1.
You are given an
Algo. Build Array from Permutation
Given a zero-based permutation nums (0-indexed), build an array ans of the same length where ans[i] = nums[nums[i]] for each 0 <= i < nums.length and return it.
A zero-based permutation nums is an array of distinct integers from 0 to nums.length —
Algo. Concatenation of Array
Given an integer array nums of length n, you want to create an array ans of length 2n where ans[i] == nums[i] and ans[i + n] == nums[i] for 0 <= i < n (0-indexed).
Specifically, ans is the concatenation of
Js.Webpack
npm init -y npm install webpack webpack-cli —save-dev
lets create our pet project
index.html, there is dependency from loadash on the web https://unpkg.com/[email protected]
<!DOCTYPE
Delphi.DeepEqualsTemplate
Here is the template for deep equals of objects through rtti. You can expand it or customize
unit DeepEquals; interface uses classes, rtti; type TObjectHelpers
Delphi.Serialization with neon lib
LinkedLists.Reverse
optimal solution
public ListNode Reverse(ListNode head){ var node = head; ListNode prev = null; while(node != null){ var next = node.next; node.next = prev;
LinkedLists.FakeNode
To avoid border cases we can create a fake or how it is called sentinel node
public void DoSmth(ListNode head) { ListNode fakeNode = new