Nov 24, 2021Learn Docker container basics in much easier way.Sometimes a code does work on the developer system, but the same code does not work in the testing environment. Docker resolves this issue of application working on one platform, does not work on some other platform. Docker work on 3rd stage An application needs various stacks, components and dependencies…Docker6 min read

Published in kapil16garg·Nov 23, 2021Why need of consistent hashingDistribute weight using Hashing So we want evenly distribute the weight or load between all Minio servers for achieving load balancing. Let’s suppose there is an ID for each and every Minio client request. And hash key that is uniformly random. …Hashing3 min read

Published in kapil16garg·Nov 23, 2021Boost libraryBoost libraries are intended to be widely useful, and usable across a broad spectrum of applications. For example, they are helpful for handling large numbers having a range beyond the long long, long double data type (264) in C++. Big Integer data type We can use either int128_t, int256_t, int512_t…Cpl9 min read

Published in kapil16garg·Updated Feb 26, 2021Count the number of elements in an array that can only divisible by even numbers except 1Given an array arr[ ] of size N, count the number of elements in an array that have only contain even divisors (1 <= arr[ i ] <= 1014 and N <= 105) Example: Input: {2, 4, 6, 8, 10} Output: 3 Explanation : 2, 4, 8 only contain even divisors so…Bit Manipulation2 min read

Published in kapil16garg·Updated Feb 26, 2021Print prime triplets such that 1 <= P < Q < R <= N and P = R — QGiven a number N, print all prime triplets { P, Q, R } (P, Q, R must be prime) such that 1 <= P < Q < R <= N and P = R — Q . Examples : Input: N = 8 Output: ({2, 3, 5}, {2, 5, 7}) Explanation: There are 2…Sieve Of Eratosthenes3 min read

Published in kapil16garg·Dec 21, 2020Here are the CODEFORCES EDU’s tasks for Segment Tree, When I solved it I found that how these…Here are the CODEFORCES EDU’s tasks for Segment Tree, When I solved it I found that how these problems depend on each other. Here I tried to explain the problem’s approaches with code in a very simple way. Segment Tree Problems — 1 — Segment Tree for the Sum — This is the basic and easiest question of the segment tree. — [Here is my AC simple solution] 2 — Segment Tree for the Minimum — Here we have to find the minimum element from a segment and can also update an…Data Structure Algorithm3 min read