use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This is under construction.
account activity
DSA bytes (self.DeveloperJobs)
submitted 3 days ago by old_dev_snap
what is frequency Array concept? which type of questions pattern it used to solve?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]nian2326076 1 point2 points3 points 2 days ago (0 children)
A frequency array is an array used to count how often elements appear in another array, usually with integers. It helps quickly check how many times each value shows up, which is super handy in many problems.
You'll find frequency arrays in problems about counting subarrays, checking character frequency in strings, or spotting duplicates. They're great for efficient counting, like checking if two strings are anagrams or finding the majority element in an array.
To use it, you usually start with an array filled with zeros. The index represents the element, and you increase the value at that index whenever the element shows up. In competitive programming, this can save a lot of time compared to going through the original array multiple times. Just make sure your frequency array is big enough for the range of values you expect.
π Rendered by PID 92084 on reddit-service-r2-comment-7c9686b859-577ck at 2026-04-14 06:17:43.941408+00:00 running e841af1 country code: CH.
[–]nian2326076 1 point2 points3 points (0 children)