<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hash Set on Algorithm Solutions</title><link>https://algorithm.liangqin.ren/tags/hash-set/</link><description>Recent content in Hash Set on Algorithm Solutions</description><generator>Hugo -- gohugo.io</generator><lastBuildDate>Thu, 24 Sep 2026 20:29:20 -0500</lastBuildDate><atom:link href="https://algorithm.liangqin.ren/tags/hash-set/index.xml" rel="self" type="application/rss+xml"/><item><title>4. Find the Group with the Most Distinct Items</title><link>https://algorithm.liangqin.ren/oa/4/</link><pubDate>Thu, 24 Sep 2026 20:29:20 -0500</pubDate><guid>https://algorithm.liangqin.ren/oa/4/</guid><description>1. Description You are given a sequence of logs containing two types of operations:
switch group: changes the current group. push item: adds an item to the current group. Adding the same item to the same group multiple times only counts once. Return the name of the group that contains the largest number of distinct items after processing all logs.
2. Solution n = logs.size()
Time complexity: O(n)</description></item></channel></rss>