Star Forcing Guide If you’re new to star forcing, hopefully this guide will help you get massive gains and increase combat power to fight stronger bosses. The past weekend was shiny starforce. This means that there’s 30% off starforcing and 5/10/15 are guaranteed. I attended this event, but ended up having the same combat power for spending 5 billion mesos. Here is a guide to get more out of your...
read more

Jun 2024

Middle of the Linked List Given the first node in a linked list, get the node which represents the middle of the list. If there are two middle nodes, ie when there is an even number of nodes, return the second node. To solve this, you use two iterators: one which moves +1 each iteration and another which moves +2. f(x) = x + 1, g(x) = x + 2....
read more

Oct 2022

Break a Palindrome Question states that given a palindrome, create the next lexicographical string that turns it no longer into a palindrome. Ex. abccba aaccba To solve this, you convert the next letter which is not an ‘a’ to an ‘a’ so that it becomes the next string. This will always be the next lexicographical string. For the case where all the letters are ‘a’ aaaaaaaa aaaaaaab You want the...
read more

Oct 2022

My Calender III Question states to create a class called my calendar III which has a function which adds bookings to the calendar. When you add a booking with a start and end time, which are integers, you have to return the max number of intersections between the bookings for the calender. Ex. Let’s say the bookings are as follows: [10, 20] [15, 30] [40, 50] [3, 18] The first...
read more

Oct 2022

Two Sum Attempt to recall: Question is “Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.” Intersection of Two Arrays vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { vector<int> ans; vector<int>::iterator it; for(int i = 0; i < nums1.size(); i++){ it = find(nums2.begin(),nums2.end(),nums1[i]); if( it != nums2.end() ){ ans.push_back(nums1[i]); *it = -1; } } return ans; } vector<int>...
read more

Nov 2021

Okay, so I tried to take notes but it was so boring. I’d rather do questions. There’s this thing called study plan on leetcode which I’m prolly just gonna follow. I clicked on all three study plans: algorithms and dynamic programming (DP). And lemme just say I kinda struggled with the two already for data structures. I started at around 12:30 PM and now it’s 2:06 PM. Contains Duplicate The...
read more

Nov 2021

i def did not skip a day Question 1: First Bad Version Today I got to solve a problem called first bad version. What you essentially do is try to find which is the bad version given that a function tells you whether or not it is a bad version. All versions after a bad version become bad. For example FFTTTTTTT, The index at 2 or the 3rd item is...
read more

Nov 2021

Okay, so I’m premed who likes to code, so I’m just gonna start now. I did a question yesterday on binary search and I will attempt to answer it again right now. Binary Search def binary_search(nums, target): left = 0 right = len(nums) - 1 while(left < right): mid = int((left+right)/2) if( nums[mid] < target ): left = mid + 1 elif( nums[mid] > target ): right = mid -...
read more

Nov 2021

The first step…trying to get scanpy… pip install scanpy This basically failed… I needed python tables and thank the lord for this I can finally start…haha I lied c:\users\melton\appdata\local\programs\python\python39\lib\site-packages\tables\__init__.py in <module> 12 13 # Necessary imports to get versions stored on the cython extension ---> 14 from .utilsextension import ( 15 get_pytables_version, get_hdf5_version, blosc_compressor_list, 16 blosc_compcode_to_compname_ as blosc_compcode_to_compname, tables\utilsextension.pyx in init tables.utilsextension() __init__.pxd in numpy.import_array() ImportError: numpy.core.multiarray failed to import...
read more

Nov 2021

Damn it was hella easy to start a blog. All I did was follow the steps here and I was able to make some posts and talk about myself. The reason I wanted to create a blog was to essentially make an online journal noting my achievements and failures and to show other human beings that I actually do some kind of work. Anyways. Go ahead and look through these...
read more

Popular
Years