Как я решил больше 1000 задач на leetcode за 2 года и потратил на это 2000+ часов своей жизни

Эта статья — не инструкция "как быстро выучить алгоритмы" и не история успеха в духе "сделал X и теперь у меня всё получилось". Скорее, это подробный и честный рассказ о длинном пути: с моими сомнениями, ошибками, периодическими откатами назад и постепенным прогрессом. Я решил написать этот текст по нескольким причинам. Если коротко: за два года решил больше 1000 задач на LeetCode и потратил на это, по моим оценкам, свыше 2000 часов. Это не рекорд и не повод для гордости. Это просто факт, который задаёт масштаб проделанной работы. Итак, наливайте чай, теперь начинаю свою историю… Ок, че там давай почитаем

https://habr.com/ru/articles/981180/

#алгоритмы #leetcode #faang #maang #algorithms #time_complexity #фаанг

Как я решил больше 1000 задач на leetcode за 2 года и потратил на это 2000+ часов своей жизни

Введение Немного о вводных данных Зачем мне вообще понадобились алгоритмы Решение пойти в структурированное обучение Организация обучения: как выглядел процесс на практике Темы для изучения и их...

Хабр

[Перевод] Big O

Нотация Big O ("О" большое) — это способ описания производительности функции без измерения времени ее выполнения. Вместо того, чтобы засекать, сколько секунд выполняется функция от начала до конца, Big O показывает, как меняется время ее выполнения по мере увеличения размера входных данных. Этот подход помогает понять, как программа будет вести себя при разных объемах входящей информации. В этой статье я разберу четыре наиболее часто встречающиеся категории нотации Big O: константную, логарифмическую, линейную и квадратичную. Не переживайте, если эти термины пока ничего вам не говорят — мы подробно рассмотрим каждый из них и наглядно визуализируем в процессе.

https://habr.com/ru/companies/timeweb/articles/942956/

#big_o #о_большое #time_complexity #временная_сложность #алгоритмы #algorithms #timeweb_статьи #timeweb_статьи_перевод #javascript #js

Big O

Нотация Big O («О» большое) — это способ описания производительности функции без измерения времени ее выполнения. Вместо того, чтобы засекать, сколько секунд выполняется функция от начала до конца,...

Хабр

This is quite a useful technical advancement! #ArXiv

https://arxiv.org/abs/2311.01362

Those that have attempted to calculate the #Robustness_of_Magic (RoM) will know that it is painfully difficult to do it computationally.

They have some improvements on the #time_complexity required.

Handbook for Quantifying Robustness of Magic

The nonstabilizerness, or magic, is an essential quantum resource to perform universal quantum computation. Robustness of magic (RoM) in particular characterizes the degree of usefulness of a given quantum state for non-Clifford operation. While the mathematical formalism of RoM can be given in a concise manner, it is extremely challenging to determine the RoM in practice, since it involves superexponentially many pure stabilizer states. In this work, we present efficient novel algorithms to compute the RoM. The crucial technique is a subroutine that achieves the remarkable features in calculation of overlaps between pure stabilizer states: (i) the time complexity per each stabilizer is reduced exponentially, (ii) the space complexity is reduced superexponentially. Based on this subroutine, we present algorithms to compute the RoM for arbitrary states up to $n=7$ qubits on a laptop, while brute-force methods require a memory size of 86 TiB. As a byproduct, the proposed subroutine allows us to simulate the stabilizer fidelity up to $n=8$ qubits, for which naive methods require memory size of 86 PiB so that any state-of-the-art classical computer cannot execute the computation. We further propose novel algorithms that utilize the preknowledge on the structure of target quantum state such as the permutation symmetry of disentanglement, and numerically demonstrate our state-of-the-art results for copies of magic states and partially disentangled quantum states. The series of algorithms constitute a comprehensive ``handbook'' to scale up the computation of the RoM, and we envision that the proposed technique applies to the computation of other quantum resource measures as well.

arXiv.org