# time complexity

Published articles for time complexity.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## CaMBRAIN: Real-time, Continuous EEG Inference with Causal State Space Models

DevFeed: [CaMBRAIN: Real-time, Continuous EEG Inference with Causal State Space Models](<https://devfeed.tech/articles/cambrain-real-time-continuous-eeg-inference-with-causal-state-space-models-137258.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2605.28792>)

Author: Abhilash Durgam, Nyle Siddiqui, Jeffrey A. Chan-Santiago, Qiushi Fu, Elakkat D. Gireesh, Mubarak Shah

Published: 2026-11-17T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Mamba](<https://devfeed.tech/topics/mamba.md>), [streaming data analytics](<https://devfeed.tech/topics/streaming-data-analytics.md>), [real-time](<https://devfeed.tech/topics/real-time.md>)

Tags: [continuous](<https://devfeed.tech/tags/continuous.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-hc](<https://devfeed.tech/tags/cs-hc.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [eeg](<https://devfeed.tech/tags/eeg.md>), [inference](<https://devfeed.tech/tags/inference.md>), [mamba](<https://devfeed.tech/tags/mamba.md>), [memory](<https://devfeed.tech/tags/memory.md>), [range](<https://devfeed.tech/tags/range.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [state-space-models](<https://devfeed.tech/tags/state-space-models.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [throughput](<https://devfeed.tech/tags/throughput.md>), [time-complexity](<https://devfeed.tech/tags/time-complexity.md>), [train](<https://devfeed.tech/tags/train.md>), [training](<https://devfeed.tech/tags/training.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

CaMBRAIN is a causal Mamba state space model designed to process variable-length EEG continuously in real time. It addresses the quadratic sequence scaling of attention-based models and the limited context of fixed-length sliding windows, using linear-time inference. Because brief EEG events may be separated by minutes, the authors introduce a multi-stage self-supervised training pipeline intended to teach the model's hidden state to retain long-range context; they argue reconstruction-focused objectives do not do this adequately for streaming models. The abstract reports state-of-the-art results on three EEG datasets and throughput over ten times higher than existing models. These claims are reported in the abstract; detailed methods and evaluation evidence are not included in the supplied excerpt.

### Source excerpt

arXiv:2605.28792v2 Announce Type: replace Abstract: Electroencephalography (EEG) is a critical, non-invasive method to monitor electrical brain activity. EEGs can span anywhere from a couple seconds to multiple hours, posing a major hurdle for existing deep learning methods due to two major factors: (1) existing EEG models are predominantly built upon the attention mechanism, incurring quadratic scaling as the sequence length increases, and (2) raw EEG signals must be processed in a sliding-window fashion due to fixed-length input requirements, preventing global understanding of the entire signal. To this extent, we propose CaMBRAIN - the first Causal, Mamba-based state space model (SSM) capable of real-time inference of EEG signals, arguing that bidirectional approaches are needlessly expensive given the causal, unidirectional nature of EEG. However, training such a model is non-trivial, as crucial EEG events can be extremely brief - within fractions of a second - yet separated by long intervals spanning minutes. Current EEG methods use self-supervised objectives that optimize for signal reconstruction, but these are not well suited for streaming SSMs; they fail to explicitly train the hidden state to retain the salient long-range context needed for streaming inference. We therefore introduce a multi-stage self-supervised training pipeline specifically tailored to encourage long-range memory retention and strong performance on EEG signals, while preserving the linear-time complexity of state space models. CaMBRAIN achieves state-of-the-art (SOTA) results across 3 different EEG datasets with >10x higher throughput than existing models, enabling the first model capable of long-range, continuous inference of variable-length EEG signals.

## Big O Cheat Sheet: Time Complexity Chart with JavaScript

DevFeed: [Big O Cheat Sheet: Time Complexity Chart with JavaScript](<https://devfeed.tech/articles/big-o-cheat-sheet-time-complexity-chart-with-javascript-136425.md>)

Original publisher: [Read original article](<https://markodenic.com/big-o-cheat-sheet/>)

Author: Marko

Published: 2026-11-16T09:00:00Z

Content type: article

Language: en

Sources: [Marko Denic Blog](<https://devfeed.tech/sources/marko-denic-blog.md>)

Topics: [Cheat sheet](<https://devfeed.tech/topics/cheatsheet.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [array](<https://devfeed.tech/tags/array.md>), [big-o-notation](<https://devfeed.tech/tags/big-o-notation.md>), [binary-search](<https://devfeed.tech/tags/binary-search.md>), [cheat-sheet](<https://devfeed.tech/tags/cheat-sheet.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [map](<https://devfeed.tech/tags/map.md>), [set](<https://devfeed.tech/tags/set.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [time-complexity](<https://devfeed.tech/tags/time-complexity.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

Big O describes how algorithm work grows with input size, rather than elapsed time; it usually refers to worst-case cost, and drops constants and lower-order terms. The excerpt explains common rates from O(1) through O(n!), using examples such as binary search on sorted data, linear array scans, and quadratic pair checking. It contrasts a quadratic duplicate check with a Set-based approach that is O(n) on average. JavaScript operation costs are presented as typical for modern engines, not specified by ECMAScript; Map and Set are required to provide average sublinear access, while O(1) is typical in practice. Array push is amortized O(1), shift is O(n), and repeated includes lookups may be replaced by Set lookups. The text also notes that sort without a comparator orders values as strings, stable sorting is required since ES2019, and Big O alone may not predict speed on small inputs.

### Source excerpt

Big O notation cheat sheet: common time complexities with JavaScript examples, a growth chart, the cost of array, Map and Set operations, and sorting.

## Community detection in complex networks via node similarity, graph representation learning, and hierarchical clustering

DevFeed: [Community detection in complex networks via node similarity, graph representation learning, and hierarchical clustering](<https://devfeed.tech/articles/community-detection-in-complex-networks-via-node-similarity-graph-representation-learning-and-hierarchical-clustering-116620.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2303.12212>)

Author: {\\L}ukasz Brzozowski, Grzegorz Siudem, Marek Gagolewski

Published: 2026-11-04T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [clustering](<https://devfeed.tech/topics/clustering.md>), [Representation learning](<https://devfeed.tech/topics/representation-learning.md>), [Graph Mining](<https://devfeed.tech/topics/graph-mining.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Deep learning](<https://devfeed.tech/topics/deep-learning.md>)

Tags: [clustering](<https://devfeed.tech/tags/clustering.md>), [community-detection](<https://devfeed.tech/tags/community-detection.md>), [complex](<https://devfeed.tech/tags/complex.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [cs-si](<https://devfeed.tech/tags/cs-si.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [graph](<https://devfeed.tech/tags/graph.md>), [networks](<https://devfeed.tech/tags/networks.md>), [similarity](<https://devfeed.tech/tags/similarity.md>), [time-complexity](<https://devfeed.tech/tags/time-complexity.md>)

### AI overview

The paper proposes three hierarchical frameworks for community detection, combining linkage-based clustering with vertex proximity measures or graph representation learning. Across 364 combinations tested on Stochastic Block Model graphs and real datasets, the strongest pipelines--using Wasserman-Faust or mutual information-based PPMI proximity, and DNGR representations--perform competitively with Leiden and Louvain while producing compatible nested partitions at every possible cardinality. The authors report near-zero practical cost to partition quality for this flexibility and greater accuracy on graphs with many small communities. Their main limitation is computational complexity: on personal machines, the approach is confined to networks of roughly 10,000 vertices.

### Source excerpt

arXiv:2303.12212v3 Announce Type: replace-cross Abstract: Community detection is a significant challenge in analysing real graphs, including social, citation, biological, and many other networks. This article proposes three new, general, hierarchical frameworks to deal with this task. The introduced approach supports various linkage-based clustering algorithms, vertex proximity matrices, and graph representation learning models. We compare 364 module combinations on Stochastic Block Model graphs and real-life datasets. We observe that our best pipelines (Wasserman-Faust and the mutual information-based PPMI proximity, as well as the deep learning-based DNGR representations) perform competitively with the state-of-the-art Leiden and Louvain algorithms. At the same time, unlike the latter, they remain hierarchical. Thus, they output a series of nested partitions of all possible cardinalities which are compatible with each other. This feature is crucial when the number of correct partitions is unknown in advance, and we show that it is obtained at near-zero practical cost in terms of partition quality. On graphs composed of many small communities, our pipelines are more accurate than the reference solutions. Nevertheless, the downside of our approach is its time complexity, which confines the framework to networks of some 10000 vertices on personal machines.

## Nearly Linear-Time Follow-the-Perturbed-Leader for Weakly Observable Graph Bandits

DevFeed: [Nearly Linear-Time Follow-the-Perturbed-Leader for Weakly Observable Graph Bandits](<https://devfeed.tech/articles/nearly-linear-time-follow-the-perturbed-leader-for-weakly-observable-graph-bandits-116927.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.04307>)

Author: Jongyeong Lee, Hyundam Yoo

Published: 2026-11-04T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Mamba](<https://devfeed.tech/topics/mamba.md>), [graph theory](<https://devfeed.tech/topics/graph-theory.md>), [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>)

Tags: [adaptive](<https://devfeed.tech/tags/adaptive.md>), [adversarial](<https://devfeed.tech/tags/adversarial.md>), [bandits](<https://devfeed.tech/tags/bandits.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [estimator](<https://devfeed.tech/tags/estimator.md>), [graph](<https://devfeed.tech/tags/graph.md>), [guarantees](<https://devfeed.tech/tags/guarantees.md>), [novel](<https://devfeed.tech/tags/novel.md>), [online-learning](<https://devfeed.tech/tags/online-learning.md>), [policy](<https://devfeed.tech/tags/policy.md>), [stat-ml](<https://devfeed.tech/tags/stat-ml.md>), [time-complexity](<https://devfeed.tech/tags/time-complexity.md>)

### AI overview

For directed weakly observable feedback graphs, the proposed Follow-the-Perturbed-Leader policy is designed for nearly linear expected time while providing guarantees for both adversarial and stochastic regimes. Its graph-based loss estimator combines forced exploration, conditional geometric resampling, and adaptive learning rates with surrogate probabilities. The stated regret is Õ(δ_*^{1/3} T^{2/3}) in adversarial settings and Õ(δ_* log T / Δ_min²) in stochastic settings, where δ_* is the fractional weak domination number and Δ_min denotes the minimum suboptimality gap. The abstract reports these guarantees but provides no further implementation or empirical details.

### Source excerpt

arXiv:2611.04307v1 Announce Type: cross Abstract: We study online learning with directed weakly observable feedback graphs and propose a Follow-the-Perturbed-Leader (FTPL) policy that achieves best-of-both-worlds guarantee with nearly linear expected time complexity. To preserve the simple structure of FTPL, we develop a novel graph-based loss estimator that combines forced exploration, conditional geometric resampling and adaptive learning rates with surrogate probabilities. Our policy achieves $\tilde{\mathcal{O}}(\delta_*^{1/3} T^{2/3})$ regret for adversarial regimes as well as $\tilde{\mathcal{O}}(\delta_* \log T / \Delta_{\min}^2)$ regret for stochastic regimes, where $\delta_*$ and $\Delta$, respectively, denote the fractional weak domination number and the suboptimality gap. These results show that refined guarantees for problems with minimax regret of $\Theta(T^{2/3})$ can be obtained through appropriately designed adaptive learning rates and loss estimators without sacrificing the simplicity of FTPL.

## Software Performance Begins with Time Complexity and Memory

DevFeed: [Software Performance Begins with Time Complexity and Memory](<https://devfeed.tech/articles/software-performance-begins-with-time-complexity-and-memory-39767.md>)

Original publisher: [Read original article](<https://furkankolcu.com/post/software-performance-begins-with-time-complexity-and-memory>)

Author: Furkan Kolcu

Published: 2025-09-10T17:39:37Z

Content type: tutorial

Language: en

Sources: [Furkan Kolcu](<https://devfeed.tech/sources/furkan-kolcu-software-engineer-blog.md>)

Topics: [Software](<https://devfeed.tech/topics/software.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [C](<https://devfeed.tech/topics/c.md>)

Tags: [big-o-notation](<https://devfeed.tech/tags/big-o-notation.md>), [binary-search](<https://devfeed.tech/tags/binary-search.md>), [c](<https://devfeed.tech/tags/c.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [go](<https://devfeed.tech/tags/go.md>), [memory](<https://devfeed.tech/tags/memory.md>), [performance](<https://devfeed.tech/tags/performance.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [space-complexity](<https://devfeed.tech/tags/space-complexity.md>), [technology](<https://devfeed.tech/tags/technology.md>), [time-complexity](<https://devfeed.tech/tags/time-complexity.md>)

### AI overview

This tutorial explains how time complexity and memory usage affect application performance as input size, system scale, and traffic increase. It introduces Big O notation, compares common complexity classes, and discusses trade-offs involving algorithms, data structures, and memory, with examples in Go and C.

### Source excerpt

Memory usage and time complexity shape the performance of every application. This post explains why they matter, how they affect scalability, and how to think about the trade-offs behind every decision.

## Effective Kotlin Item 60: Use appropriate collection types

DevFeed: [Effective Kotlin Item 60: Use appropriate collection types](<https://devfeed.tech/articles/effective-kotlin-item-60-use-appropriate-collection-types-39273.md>)

Original publisher: [Read original article](<https://kt.academy/article/ek-collection-types>)

Published: 2023-12-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Collections](<https://devfeed.tech/topics/collections.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [thread](<https://devfeed.tech/tags/thread.md>), [time-complexity](<https://devfeed.tech/tags/time-complexity.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This Kotlin article explains the contracts and implementation considerations of lists, sets, and maps. It focuses on how underlying data structures, mutability, thread safety, and array-based list growth affect collection performance and operation time complexity.

### Source excerpt

Using non-standard collection types to improve performance in Kotlin.

## B-Tree Indexes in Prisma ORM: Make Slow Postgres Queries 80x Faster

DevFeed: [B-Tree Indexes in Prisma ORM: Make Slow Postgres Queries 80x Faster](<https://devfeed.tech/articles/b-tree-indexes-in-prisma-orm-make-slow-postgres-queries-80x-faster-47656.md>)

Original publisher: [Read original article](<https://www.prisma.io/blog/improving-query-performance-using-indexes-2-MyoiJNMFTsfq>)

Author: Alex Ruheni

Published: 2022-09-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Prisma](<https://devfeed.tech/sources/prisma-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Prisma](<https://devfeed.tech/topics/prisma.md>), [Database](<https://devfeed.tech/topics/database.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [analyze](<https://devfeed.tech/tags/analyze.md>), [b-tree](<https://devfeed.tech/tags/b-tree.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [explain](<https://devfeed.tech/tags/explain.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [orm](<https://devfeed.tech/tags/orm.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [prisma](<https://devfeed.tech/tags/prisma.md>), [queries](<https://devfeed.tech/tags/queries.md>), [time-complexity](<https://devfeed.tech/tags/time-complexity.md>)

### AI overview

A practical tutorial on using B-tree indexes in a Prisma ORM schema to improve PostgreSQL query performance. It explains how B-tree indexes work and reports a verified reduction in query time from roughly 66 milliseconds to under 1 millisecond on 500,000 rows using Prisma ORM 7.8 and PostgreSQL 17.

### Source excerpt

Add a B-tree index in your Prisma schema with @@index and turn a 66ms sequential scan into a sub-millisecond lookup, an 80x improvement verified on Prisma ORM 7 and PostgreSQL 17 with EXPLAIN ANALYZE.