© 2023 Hashnode

#time-complexity

Introduction : Data structures are fundamental building blocks in computer science and play a vital role in efficient algorithm design. When working with data, optimizing efficiency becomes crucial. I…

Introduction: In computer programming, decision-making structures are crucial for controlling the flow of execution based on specific conditions. Two popular constructs used for decision-making in C a…

Introduction Hello there👋. Welcome to the article on Time complexity ⌛for data structures and algorithms . In this article, I will take you from definition, calculation of time complexity, efficiency…

Techletter #24 | May 18, 2023 Big O is the metric that we use to describe the efficiency of algorithms. Big O determines the upper bound of the time. Ω (Big Omega) describes the lower bound. Θ (Big theta) means both O and Ω. Θ Gives a tight…

Introduction In today’s digital age, data is king. From e-commerce to social media to scientific research, data is the backbone of many industries. However, with vast amounts of data comes the need for efficient search algorithms that can q…

What Is Good Code? High-quality code demonstrates cleanliness, efficiency, reliability, and scalability. It adheres to coding standards, gracefully handles errors, and is designed to accommodate growi…

Big O notation is a mathematical concept used in computer science to describe the time complexity of an algorithm. In simple terms, it represents how quickly the algorithm's running time grows with th…

📍Introduction A Prefix array is a simple yet effective tool in computer programming. It helps to minimize the repeated calculations done in an array and reduces the time complexity of your program. �…

Overview I walk you through how to solve Leetcode problem 347. Top K Frequent Elements. Approach 1: Count HashMap def topKFrequent(nums, k): count = {} res = [] for n in nums: count[n] = count.get(n, 0) + 1 for _ in …

As a programmer, you're likely familiar with the concept of algorithms, which are sets of instructions for solving a particular problem. But have you ever stopped to consider how efficient your algorithms are? That's where Time complexity c…