Open yangshun opened 2 years ago
can we add simple auth from firebase or facebook so that if we switch computer or clear application memory we can still keep our progress?
https://firebase.google.com/docs/auth/web/firebaseui would be a way to add this.
WDYT?
can we add simple auth from firebase or facebook so that if we switch computer or clear application memory we can still keep our progress?
@nanomosfet Everything can be added, it's just how much engineering maintenance overhead using a database results in. The way TIH and Grind 75 are built is (almost) purely static pages, resulting in fast performance and low engineering maintenance.
I do think will be useful when there are more users. How about this, when your comment gets 50 upvotes I'll look into implementing it. I'll start with the first upvote.
@yangshun Can we have a feature like export the list as CSV? I think that can be a temporary solution for @nanomosfet feature. People can download the csv and save it in google drive or whatever they like and keep track themselves.
JSON.parse(localStorage.getItem('1:completedQuestions')).join(',')
can get you the values of your completed questions as a CSV string if you do above in browser console when on grind 75 page
it only gives the array of completed problems. not much helpful IMO. what I am looking for a csv which will have the problems link with week, time, difficulty so that we can simply use the csv to keep track and follow week-by-week. If we can download the list by customizing weeks and hours per week parameter, then download the csv that would be a helpful feature.
if you copy the output of
JSON.parse(localStorage.getItem('1:completedQuestions')).join(',')
paste it into a file. then on the blank machine do
localStorage.setItem('1:completedQuestions',JSON.stringify('outputString'.split(',')))
you should be able to recover your progress.
but i think what you're asking is for a CSV of detailed info about the problems
in my case i was able to do
localStorage.setItem('1:completedQuestions', JSON.stringify('two-sum,valid-parentheses,merge-two-sorted-lists,best-time-to-buy-and-sell-stock,valid-palindrome,invert-binary-tree,valid-anagram,binary-search,flood-fill,maximum-subarray,longest-palindrome,majority-element,contains-duplicate,implement-queue-using-stacks,longest-substring-without-repeating-characters,evaluate-reverse-polish-notation,middle-of-the-linked-list,linked-list-cycle,lowest-common-ancestor-of-a-binary-search-tree,balanced-binary-tree,reverse-linked-list,first-bad-version,ransom-note,climbing-stairs,add-binary,min-stack,maximum-depth-of-binary-tree,insert-interval,k-closest-points-to-origin,3sum,01-matrix,diameter-of-binary-tree,binary-tree-level-order-traversal,clone-graph,course-schedule,search-in-rotated-sorted-array,number-of-islands,rotting-oranges,combination-sum,coin-change,implement-trie-prefix-tree,product-of-array-except-self,validate-binary-search-tree,permutations,merge-intervals,lowest-common-ancestor-of-a-binary-tree,time-based-key-value-store,sort-colors,word-break,spiral-matrix,partition-equal-subset-sum,subsets,accounts-merge,binary-tree-right-side-view,longest-palindromic-substring,meeting-rooms,lru-cache,letter-combinations-of-a-phone-number,container-with-most-water,word-search,unique-paths,construct-binary-tree-from-preorder-and-inorder-traversal,trapping-rain-water,merge-k-sorted-lists'.split(',')))
and my progress was restored
Hi @yangshun First of all, thank you for this awesome resource. This has been super helpful for my interview prep. I was looking through the repo to add the discussed feautres, but I could not find the Grind75 related files. Only thing that looked somewhat related was QuestionList.js in (/content/component) directory. Are files in a separate repo?
As a QOL request, would it be possible to add a timer to the page to say “you’re 9 days into your 4 weeks grind session”?
At some point, days just start to blend together and you can forget if you’re on day 10,11, or 12. Whereas if a timer was an option to be displayed on the page, that would make this easy to track.
The URL could change similar to how it does for custom Grind75 schedules, allowing this to be bookmarkable, in the example below, I use today (Aug-28-2022), which is 19,230 days since Jan 1 1970.
Currently, when you modify the default schedule, the URL is in the form
https://www.techinterviewhandbook.org/grind75?hours={hours}&grouping=weeks&weeks={weeks}\
I propose just adding a &startDate={startDate} to the end of that, so the no-data would look like
https://www.techinterviewhandbook.org/grind75?hours={hours}&grouping=weeks&weeks={weeks}\&startDate={startDate}
So 20 hours, 4 weeks, starting Aug-28-2022 would look like
https://www.techinterviewhandbook.org/grind75?hours=20&grouping=weeks&weeks=3&startDate=19230
It would be nice if we could click on the badge and have the corresponding cheatsheet open up in a new tab.
For example, this would open to https://www.techinterviewhandbook.org/algorithms/array/
An additional loading icon beside each question would help greatly in spaced repetition. Furthermore, I think that upon tapping of loading icon you can set custom reminders(eg 3 day gap) for the question to pop up in the notification section for you to revisit the questions.
Can we add dark mode too. Couldn't see any option for it.
I am a GSSoC'23 contributor. I have all the skills required. Please assign me this issue, I want to work on this issue under the GSSoC'23.
Allow showing the topic for one question at a time.
Show topics
button to Show all topics
/Hide all topics
Show topic
/Hide topic
to each questionReason: Sometimes you want to view the topic just for one question but don't want any "spoilers" for the others, and it's hard to avoid seeing the next question's topic when you click Show topics
Another possibility is to use storage.sync to store study progress without having to maintain a database.
I made an userscript to backup my progress. Figured out I could share it here. Very basic, but maybe someone could find it useful.
https://github.com/remusa/userscripts/tree/master/src/grind-75-export
@yangshun
For people looking for a way to export the Grind 75 questions to a CSV file, I am sharing this Python script for your convenience. You can tailor the columns for your own use.
Hope this helps others.
@yangshun @avijit1258 @nanomosfet
import json
import csv
def json_to_csv(json_file, csv_file):
# Open the JSON file and load data
with open(json_file, 'r') as f:
data = json.load(f)
# Open CSV file for writing
with open(csv_file, 'w', newline='') as f:
# Create a CSV writer object
writer = csv.writer(f)
# Extract specific keys
keys_to_extract = ["id", "title", "url", "difficulty", "duration", "topic"]
# Write header row
writer.writerow(keys_to_extract + ['Week'])
# Loop through all weeks
for week, questions in data.items():
week_number = week.split()[1] # Extracting week number from week key
for question in questions:
row = [question[key] for key in keys_to_extract] + [week_number]
writer.writerow(row)
print("CSV file created successfully!")
def main():
# File paths
json_file_path = 'apps\website\contents\_components\QuestionGroups.json'
csv_file_path = 'apps\website\contents\_components\QuestionGroups.csv'
# Convert JSON to CSV
json_to_csv(json_file_path, csv_file_path)
print("Conversion successful!")
if __name__ == "__main__":
main()
Here's a GitHub gist of Grind 75 in Markdown that folks can fork to keep track of their progress between machines using GitHub.
This is a master issue to keep track of the Grind 75 features people are asking for: