vishalmx3

vishal.codes

Posted on May 2, 2024

Day 32/366

šŸš€ Today's Learning:
šŸŒŸ DSA

  • Check whether two Strings are anagram of each other
  • Print all anagrams together

šŸŒŸ Dev

  • Redux Persist

šŸ” Some Key Highlights:

DSA

To check whether two strings are anagrams of each other, iterate through each character of both strings, counting the frequency of each character in each string using a hashmap. Then, compare the frequency maps of both strings. If the maps are identical, the strings are anagrams; otherwise, they are not.

To print all anagrams together, create a hashmap where the keys are sorted versions of each word in the input list, and the values are lists of words that are anagrams of each other. Iterate through the input list of words, sorting each word and using the sorted word as a key to group anagrams together in the hashmap. Finally, iterate through the hashmap and print each list of anagrams together.

DEV

Redux Persist is a library used in Redux-based applications to persist the Redux state to storage, typically AsyncStorage in React Native or localStorage in web applications. It allows the state to be saved across browser or app restarts, ensuring a seamless user experience. Redux Persist works by integrating with the Redux store and providing middleware that automatically saves the state to storage whenever it changes. Upon app or browser restart, the persisted state is retrieved from storage and rehydrated into the Redux store, allowing the application to resume from where it left off. This library simplifies the process of implementing persistence in Redux applications, enhancing reliability and user satisfaction.

#100daysofcode #1percentplusplus #coding #dsa

šŸ’– šŸ’Ŗ šŸ™… šŸš©
vishalmx3
vishal.codes

Posted on May 2, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Day 42/366
1percentplusplus Day 42/366

May 12, 2024

Day 41/366
1percentplusplus Day 41/366

May 11, 2024

Day 40/366
1percentplusplus Day 40/366

May 10, 2024

Day 39/366
1percentplusplus Day 39/366

May 9, 2024

Day 38/366
1percentplusplus Day 38/366

May 8, 2024