Skip to content

Duraimurugan/code-everyday

Repository files navigation

Goal is to code algorithms, puzzles, interview questions in JS/TS every day for the next 100 days

Day 01: 💡 fizzbuzz problem

Day 02: 💡 Sorting using inbuilt Sort method 🔥 inbuilt sort method mutates original array 💡 Check if two strings are anagrams 🔥 introduction and usage maps 🔥 usage of for-of statement 🔥 usage of Object.has methods 🔥 usage of Array.from and Array.every methods

Day 03: 💡 Palindrome with inbuild methods 💡 Check permutation of a string is a Palindrome 🔥 usage set 🔥 usage of Set.has, add, delete methods

Day 04: 💡 fibonacci series with recursion 🔥 time complexity - O(2 POW N) 🔥 space complexity - O(N) 💡 fibonacci series with recursion - optimized 🔥 memoization 🔥 time complexity - O(N) 🔥 space complexity - O(N)

Day 05: 💡 Leet code : puzzle: First non-repeating character in a string 🔥 use of maps 🔥 time and space complexity O(N) instead of O(N SQR) by avoiding multiple loops

Day 06: 💡 Leet code : puzzle: Product of array elements except self 🔥 time and space complexity O(3N): can be improved to O(2N) and eventually O(N)

Day 07: 💡 Leet code : puzzle: Squared array 🔥 Math.abs usage 🔥 time and space complexity O(N)

Day 08: 💡 Learnt: bubble sort algorithm - egghead.io 🔥 Good for small size array. bigger element is bubbled to the end 🔥 time complexity: O(N^2) 🔥 space complexity: O(N)

Day 08: 💡 Leet code: determine if sum exists 🔥 time complexity: O(N) and space complexity: O(N) instead of O(N ^ 2)

Day 09: 💡 Egghead.io: implementation of breadth first search 🔥 usage of graph in JS

Day 10: 💡 Egghead.io: Divide and conquer algorithm 🔥 basic recursion: different way of thinking about a problem

About

code-everyday

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published