CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
NaN.
tutorial
Why do we need (efficient) algorithms?
Cards
Scroll
Introduction
Computers can only do a limited number of operations in a given time, usually about a billion operations per second. Here, by an individual operation, we mean addition, multiplication, assigning a value to a variable, etc. Hence, if we want our algorithm to finish executing in a second or so, then we need to make sure that the total number of operations we are asking it to do is less than 1 billion.
Estimating the exact run-time of an algorithm without implementing and executing it is very tough since it depends on so many factors - including the programming language being used, the compiler, the hardware of the computer itself, and more. Instead, what we'd like to do most of the time, is to estimate the run-time approximately.
Rate of growth
In algorithms, we focus on estimating the execution ...
What is the basic requirement for beginners? The introduction to Algorithm course appears to assume some pre-knowledge of the behaviour of certain functions.
Recursion is a fundamental technique used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematics and computer science, where a function being defined is applied within its own definition.
In computer science, a common method of simplification is to divide a problem into subproblems of the same type. As a computer programming technique, this is called divide and conquer and is key to the design of many important algorithms. Divide and conquer serves as a top-down approach to problem solving, where problems are solved by solving smaller and smaller instances. A contrary approach is Dynamic Programming. This approach serves as a bottom-up approach, where problems are solved by solving larger and larger instances, until the desired size is reached.
Mathematical Induction
It's recommended that you learn mathematical inducti...
Motivation: Given an array of N numbers, you need to support two operations. Operation 1: find-min(i, j) = return the minimum value in array[i ... j]. Operation 2: update(i, v) = update the value at array[i] to v. Solve the problem for N <= 10^6, number of operations <= 10^6.
To solve the above problem, both the operations need to run in O(log N) time, but using an naive array gives O(N) run-time for operation 1 (and O(1) run-time for operation 2). So how do you solve the problem? Read on. :)
Video tutorial: This is a superb tutorial, giving the motivation, walking through example, and going step-by-step through the pseudocode.
In the heavy light decomposition explanation, what if the node for which we have to handle the get(v) query is heavy? In that case, the complexity would be O(number of edges from v) and not O(√n).
we’re going to configure JIRA for use by an imaginary accounting department. The people in Accounting may have decided to store invoices in JIRA rather than using some other dedicated and perhaps much more expensive system.
The information stored for Accounting is totally different from what appears in a Bug issue type, and includes a custom field named Amount. Only certain people can see the accounting information in JIRA, and some of this information is still further restricted. The accounting department also requested that they should see nothing about Engineering projects, since that was just unnecessary clutter on their screens.
The first thing to do is to take a backup of your JIRA data, do this work on a development JIRA instance, or both. The next things to do are:
Create a new Project Category for the accounting department, e.g., Accounts. Some scheme names will use this word as a prefix, so make sure that the category name is something obviously unique, meaningful and brief.
Create a new issue type for that department’s issues...
Yes this kind of loop holes are pretty common when people learn things from blogs etc. Can you copy paste the above and post as separate discussion. Will add it to algorithm playlist.