[Cracking Coding Problems] Bitwise Operations
Pairwise Swap Write a program to swap odd and even bits in an integer with as few instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and bit 3 are swapped, and so on) ...
Pairwise Swap Write a program to swap odd and even bits in an integer with as few instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and bit 3 are swapped, and so on) ...
Build Order Approach Create the inDegree dictionary to represent the number of dependencies for each project If the inDegree == 0, add the project to the queue For eac...
LRU(Least Recently Used) Cache Implement an LRU cache using a doubly linked list and hash map get(key) Retrieve the value associated with the key from the cache. If the key ...
Return Kth to Last Find the kth to last element in a singly linekd list Approach make a two pointers, first and second The first pointer moves ahead by k setps An...
One Away There are three types of edits that can be performed on strings: insert a character, remove a character, or replace a character. Given two strings, write a function to check if th...
Climbing Stairs 1. Code Each time you can either climb 1 or 2 steps class Solution { public: int climbStairs(int n) { if (n == 1) return 1; if (n == 2) return 2; ...
Django Github : KRX 1. spaCy’s lemmatization Currently, the code that only checks for “exceeded” (base) So, I modify the function to detect not just “exceed” but also its various fo...
React Github : KRX-frontend 1. Asynchronous authTokenLogin.js const handleLogin = async () => { Define ansynchronous It is triggered when the u...
Django Github : KRX 1. Natural Language (NLP) Using spaCy, I built a function to extract a stock name (company name) and a price threshold For exmaple, If i ask “What did Apple ...
Django Github : Potato 1. Understand how the src/components/auth/sign-in-form.tsx components is dsigned The sign-in-form component handles its own state internally using react-hook-form, whic...