Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Python
21.3K+ articles
Experiences
16.6K+ articles
Interview Experiences
14.1K+ articles
JavaScript
12.2K+ articles
School Learning
11.5K+ articles
Arrays
6.5K+ articles
Strings
3.3K+ articles
In-house
+ articles
Precomputation
11 posts
Recent Articles
Popular Articles
Find minimum value of arr[j] + abs(j - i) for all indices
Last Updated: 28 May 2024
Given an array arr[] of size N, the task is for each index i (1≤i≤n) find it's minimum value, that can be calculated by the formula (arr[j] + abs(j−i)), for 0=jn and j != ...
read more
Mathematical
Competitive Programming
Arrays
Picked
DSA
Precomputation
Find Shortest Distance to Target Color
Last Updated: 03 May 2024
Given an array colors, in which there are three colors: 1, 2 and 3. You are also given some queries. Each query consists of two integers i and c, return the shortest dista...
read more
Arrays
Google
Picked
DSA
Precomputation
CSES Solutions - Counting Divisors
Last Updated: 10 April 2024
Given N integers as an array arr[], your task is to report for each integer the number of its divisors.For example, if x=18, the correct answer is 6 because its divisors a...
read more
Mathematical
Competitive Programming
Picked
DSA
Precomputation
CSES Problems
Find two indices with different values within specified range
Last Updated: 23 March 2024
You have an array arr[] of size N and Q queries where in each query, we need to find two distinct indices within the specified range in the array such that the values at t...
read more
Arrays
DSA
Precomputation
Queries for Sum of Bitwise AND of all Subarrays in a Range
Last Updated: 11 March 2024
Given an array arr[] of size N, the task is to answer a set of Q queries, each in the format of queries[i][0] and queries[i][1]. For each queries[i], find the sum of Bitwi...
read more
Bit Magic
Geeks Premier League
DSA
Geeks Premier League 2023
Precomputation
Find triplet (i, j, k) to maximize (P * arr[i] + Q * arr[j] + R * arr[k])
Last Updated: 16 February 2024
Given an array arr[] of size N and three numbers P, Q, and R. The task is to find three indices named (i, j, k) in the given array such that i j k, and the value of equa...
read more
Arrays
Picked
DSA
Precomputation
Suffix Automation
Last Updated: 18 January 2024
In computer science, a suffix automaton is an efficient data structure for representing the substring index of a given string which allows the storage, processing, and ret...
read more
Competitive Programming
Picked
Suffix
Geeks Premier League
DSA
Geeks Premier League 2023
Precomputation
Minimize operations to make string Z equal to T by appending subsequence of S
Last Updated: 24 February 2024
Given two strings S and T, and an empty string Z, the task is to print the minimum operations required to make string Z equal to T by appending any subsequence of S at the...
read more
Strings
Competitive Programming
Algorithms-Dynamic Programming
Picked
Geeks Premier League
DSA
Geeks Premier League 2023
Precomputation
Hostel WiFi Range Problem
Last Updated: 28 January 2024
Geekland State University's hostel has a line arrangement of N rooms. You have been provided with a binary string S of length N. In this string, if S[i] = '1', it means th...
read more
Strings
Greedy Algorithms
Geeks Premier League
DSA
Geeks Premier League 2023
Precomputation
Tutorial on Precomputation techniques in Strings
Last Updated: 29 December 2023
Precomputation in strings refers to the process of performing calculations on a given string before actual operations or queries are performed.The goal of precomputation i...
read more
Strings
DSA
Precomputation
Precomputation Techniques for Competitive Programming
Last Updated: 01 May 2024
What is the Pre-Computation Technique?Precomputation refers to the process of pre-calculating and storing the results of certain computations or data structures in advance...
read more
DSA
Precomputation
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !