Various resources relating to the n-way set-associative cache coding challenge.
Friendly IT Consultant with 8+ years experience
Various resources relating to the n-way set-associative cache coding challenge.
How to design/use generic classes (ie. accepting various different types)
Gives a good overview of what generics are and how specifically to use them in C#
General info on caches (ie. what caches are, why they are useful, and how they are structured)
12-min intro to cache basics
Good overview of memory hierarchy in computer hardware; begins talking about cache (and how this is used etc.) at around the 58-minute mark.
The other links in this section are about low-level caching, dealing with bits and bytes and direct memory addresses; however, your exercise isn't asking for that, but rather for a caching implementation for various high-level types (like integers, strings, custom classes, etc.). This article is probably a bit more directly relevant to your coding challenge.
A good intro to set associative caches, including some helpful visualizations - I recommend watching this video first, and then moving on to the other links provided here.
However, please note that this video talks about bits and memory addresses (ie. how cache works within the actual hardware of a CPU) - as such, this is more complicated than is needed for the coding challenge. For example, a standard C# type like "int" or "char" can be used as a Tag - we don't need to use bits and bytes for this as shown in this video.
Various resources to help sharpen your coding skills and prepare for dev interviews (and the associated jobs!)
How to install/setup a basic C# project using Visual Studio
General tips for doing great in a tech interview
Another good resource for interview preparations
Some resources to help get started on this coding challenge
Careful - this is an actual solution to the challenge! Can be used as a reference as you see fit (ex. quick look before starting to get an idea of how to do this, after starting to see if you're on the right track, or after completed to see how your solution compares)
Explains why you might actually want to use your own cache in your programs, and gives some examples how to use the existing library; useful for getting a sense of the "why" of this coding challenge.
A more complete solution to the the problem, split into a handful of classes (more advanced than anything you'd need for an interview question, to be sure).
General info on cache concepts, along with descriptions of various cache-related terms you'll see referenced elsewhere.