From 84458e5a597bfc2d1c8d871466d5c032199b4a19 Mon Sep 17 00:00:00 2001 From: Jerome Pui Date: Fri, 3 Jun 2022 19:26:26 +0800 Subject: [PATCH] contents: fix typo and grammar in study cheatsheet --- contents/algorithms/study-cheatsheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/algorithms/study-cheatsheet.md b/contents/algorithms/study-cheatsheet.md index 9d8d14f5..7dc8010e 100644 --- a/contents/algorithms/study-cheatsheet.md +++ b/contents/algorithms/study-cheatsheet.md @@ -84,7 +84,7 @@ Data structures are your weapons. Choosing the right weapon for the right battle Data structures can be augmented to achieve efficient time complexities across different operations. For example, a hash map can be used together with a doubly-linked list to achieve O(1) time complexity for both the `get` and `put` operation in an [LRU cache](https://leetcode.com/problems/lru-cache/). -hash tables are probably the most commonly used data structure for algorithm questions. If you are stuck on a question, your last resort can be to enumerate through the common possible data structures (thankfully there aren't that many of them) and consider whether each of them can be applied to the problem. This has worked for me sometimes. +Hash table is probably the most commonly used data structure for algorithm questions. If you are stuck on a question, your last resort can be to enumerate through the common possible data structures (thankfully there aren't that many of them) and consider whether each of them can be applied to the problem. This has worked for me sometimes. If you are cutting corners in your code, state that out loud to your interviewer and say what you would do in a non-interview setting (no time constraints). E.g., I would write a regex to parse this string rather than using `split()` which may not cover all cases.