Merging User Accounts with Disjoint Set Union and Email Mapping
Problem Statement
Given a list accounts where each element accounts[i] is a list of strings, the first element accounts[i][0] is a name, and the remaining elements are email addresses belonging to that account.
The goal is to merge accounts. Two accounts belong to the same person if they share atleast one email address. Note that accounts with ...
Posted on Fri, 21 Aug 2026 16:15:37 +0000 by bruceg
Finding the Shortest Path with Time-Based Road Closures using Dijkstra's Algorithm
This problem involves finding the shrotest path in a graph where certain edges are temporarily closed. The graph has $N$ nodes and $M$ edges, with $N \le 1000$ and $M \le 10000$. Given the constraints, an adjacency matrix is a suitable choice for representing the graph.
We need to determine the optimal travel time for a character, let's call th ...
Posted on Tue, 28 Jul 2026 17:09:19 +0000 by lar5
Building Interactive Graph Visualizations with go-echarts in Go
package main
import (
"os"
github.com/go-echarts/go-echarts/v2/charts"
github.com/go-echarts/go-echarts/v2/event"
github.com/go-echarts/go-echarts/v2/opts"
)
func main() {
// Initialize a new graph chart
g := charts.NewGraph()
// Define JavaScript handler for click events
clickHandler := opts.FuncOpts(`(para ...
Posted on Fri, 08 May 2026 12:24:24 +0000 by Monshery