и посмотреть медиа
PHP | LeetCode - Tests and Security
и посмотреть медиа
Resource with LeetCode PHP tests, interview questions and vacancies. Ideal for preparing for work as a developer.
Resource with LeetCode PHP tests, interview questions and vacancies. Ideal for preparing for work as a developer.
AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.
This Telegram resource is dedicated to preparing for PHP interviews using LeetCode tasks. Here are the latest tests that will help you master key algorithms and data structures in PHP.👨💻The section with interview questions contains typical tasks that are asked in the interviewIT-companies. Users will find solution parsings, code examples and optimization tips. This is a great way to practice before a real interview.📚In addition, vacancies for PHP developers are published. The resource helps not only to learn, but also to find work in the field of web development. Regular updates provide fresh content for all levels—fromjuniorbeforesenior.
Задача: 820. Short Encoding of Words Сложность: medium Допустимым кодированием массива слов является любая опорная строка s и массив индексов indices, такие что: words.length == indices.length Опорная строка s заканчивается символом '#'. Для каждого индекса indices[i], подстрока строки s, начинающаяся с indices[i] и заканчивающаяся (но не включительно) следующим символом '#', равна words[i]. Дан массив слов, верните длину самой короткой возможной опорной строки s для любого допустимого кодирования слов. Пример: Input: words = ["time", "me", "bell"] Output: 10 Explanation: A valid encoding would be s = "time#bell#" and indices = [0, 2, 5]. words[0] = "time", the substring of s starting from indices[0] = 0 to the next '#' is underlined in "time#bell#" words[1] = "me", the substring of s starting from indices[1] = 2 to the next '#' is underlined in "time#bell#" words[2] = "bell", the substring of s starting from indices[2] = 5 to the next '#' is underlined in "time#bell#" 👨💻 Алгоритм: 1⃣Поскольку слово имеет не более 6 собственных суффиксов (так как words[i].length $_) { $length += strlen($word) + 1; } return $length; } } Ставь 👍 и забирай 📚 Базу знаний
Открыть канал и посмотреть медиаOnly registered users can share their opinion.
Be the first to share your impression of this resource!