Open in app
Home
Notifications
Lists
Stories

Write
Amit Singh Rathore
Amit Singh Rathore

Home

6 hours ago

String Matching with Rabin Karp

Searching of Patterns Given a string and a pattern find all indexes where the pattern is found in the string. Brute Force: Compare the given pattern against all positions in the text.

Python

4 min read

String Matching with Rabin Karp
String Matching with Rabin Karp

Published in Geek Culture

·5 days ago

Kadane’s Algorithm — Python

Approach to solve subarray problems in a single pass and constant space. The number of subarrays of an array with at least one element is N*(N + 1)/2. So if we have a problem where we need to check all subarrays for max, min, etc, we can use Kadane’s Algorithm…

Algorithms

5 min read

Kadane’s Algorithm — Python
Kadane’s Algorithm — Python

Published in FAUN Publication

·Jun 17

Minimum Spanning Tree — Python

Kruskal’s Algorithm | Prim’s Algorithm The Minimum Spanning Tree (MST) of an undirected graph is a Tree such that the sum of all edge weights of the tree is minimum. There are two ways to implement MST namely Kruskal’s & Prim’s Algorithms. Kruskal’s Algorithm Steps Sort all the edges of the graph from…

Graph

3 min read


Published in Python in Plain English

·Jun 16

Topological Sort — Python

BFS and DFS implementation — The topological sort of a DAG is the partial linear ordering of its nodes such that if that graph has an edge directed from u to v, u should be placed in the ordering before v. Partial ordering is very useful in many situations. Scheduling problems, dependency resolutions. Some useful…

Python

3 min read

Topological Sort — Python
Topological Sort — Python

Published in Python in Plain English

·Jun 15

Union Find — Data Structure in Python

A Union-Find/Disjoint set data structure is used to maintain a set of elements partitioned into a number of mutually non-overlapping subsets. Disjoint Set —A disjoint set is a group of sets where no item can be in more than one set. In other words, if we take any two sets…

Python

4 min read

Union Find — Data Structure in Python
Union Find — Data Structure in Python

Published in FAUN Publication

·Jun 14

Spark joins — A refresher

INNER | LEFT| RIGHT | FULL | CROSS | SEMI | ANTI JOIN is one of the most common operations/transformations in Spark. Spark SQL supports all the fundamental types of joins. In this blog, we will go through the type of joins and their value proposition. Sample table 1 +----------------+---------+----------+ |…

Spark

6 min read

Spark joins — A refresher
Spark joins — A refresher

Published in AWS in Plain English

·Jun 11

Observability in AWS —Cloudwatch

Central logging & monitoring solution in AWS cloud — Observability Track the overall correctness of any system. In simpler words Observability services help you with following Collect & analyze data from apps Understand their state Be alerted/notified Troubleshoot A good observability service should allow us to ingest/collect, store, search analyze, correlate, and visualize logs and traces. …

AWS

4 min read

Observability in AWS —Cloudwatch
Observability in AWS —Cloudwatch

Published in Geek Culture

·Jun 6

Snowflake — Time Travel

Travel back in time to see the table state as it was at that time. I want to go back in time. Not to change anything, but to feel something again. — Mercer Snowflake Time Travel is an interesting tool that allows us to access historical data (data that has…

Data Warehouse

4 min read

Snowflake — Time Travel
Snowflake — Time Travel

Published in Python in Plain English

·Jun 4

Unbounded Knapsack — Pattern

Discrete & repeated selection of item — Unlike the 0/1 Knapsack problem, in an unbounded Knapsack, we are allowed to use an unlimited number of instances of an item. Given a knapsack weight A and a set of items with a certain value B[i] and weight C[i], we need to calculate the maximum amount that could fit…

Python

3 min read

Unbounded Knapsack — Pattern
Unbounded Knapsack — Pattern

Published in Python in Plain English

·Jun 4

0/1-Knapsack — Coding Pattern

Putting discrete items in bags to maximize profit — The Knapsack problem is a combinatorics optimization problem. To solve this kind of problem we can follow the following: General strategy: Find base case Find recurrence relation Reuse computed values Write the bottom-up iterative solution Given the weights, w, and profits p of ’N’ items, need to find a subset of these…

Dynamic Programming

5 min read

0/1-Knapsack — Coding pattern
0/1-Knapsack — Coding pattern
Amit Singh Rathore

Amit Singh Rathore

Cloud | Big Data | ML

Following
  • Tony

    Tony

  • Pinterest Engineering

    Pinterest Engineering

  • adrian cockcroft

    adrian cockcroft

  • Xinran Waibel

    Xinran Waibel

  • Joao Marques @ Data Beyond Ltd

    Joao Marques @ Data Beyond Ltd

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable