Mar 22, 2023-present
Became the vice head boy of my school. Trying to the best job I can. Also, environment club work (head of events) and another project (summary for that will come in May 2023)
Much smoother, in a way.
Still a bit left, but got the video fixed (yay!)
All done (soon).
Nearly (or fully?) done with a lot of smaller projects for this.
Got a lot of work done for both projects. Really happy!
Cameraman, anyone? Also, won best speaker for a motion in a debate, and lot's of environment work.
Did some (really^3 important) organisational work.
Did some (really, really important) organisational work.
Did some (really important!) organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work and a lot of writing for a proposal.
Did some organisational work and a morning event.
Did some organisational work and partook in a successful morning event.
Got some important messages + a template out yesterday.
Incredible day.
Got a speech ready and many rehersals (my knee can atest) done + dance was conducted somewhat successfully and an awesome Instagram post.
Worked on a video, event should go smoothly for tomorrow and day after.
Sorted out a technical issue + got content/photos for a post idea that I came up with! (worked on the main document a bit as well)
Did some organisational work.
Got a lot of work and recording done for an event.
Communication is key.
Did a lot of organisational work and generally, got a lot done!
Had a fruitful discussion with the design team!
Finished a document and getting some ideas for EC!
Lots of voting and discussions - but we're done with colour scheme.
Sent out the video draft (that another person worked on!) for the event in May and helped to sort out a mini-crisis.
Did some organisational work.
Had a productive meeting for event in May.
Top 6 now - also need to get better videos tomorrow...
Compiled the top 8. Waiting for results (+ more democracy!). Also, (a pretty fun but productive) meeting for event in May.
Colour - so trivial yet so important. Also, all applications are now sorted (EC)
Worked on compiling designs and setting up voting, and also contacted someone.
Summary of Environment Club (EC) Work: Will merge this log with this one. After my student council work in 11th, I mostly just had meetings, an application form for this academic year (which I finished) and a run!
Did some organisational work.
Finished initial organising work and informed a section of the council about an upcoming task.
Jan 04, 2023-present
Became part of OptX, my school's student-led initiative to provide opportunities to the youth. Trying to the best job I can.
Got some leads!
Did some organisational work.
Had some interesting discussions.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Really successful meeting!
Did some organisational work.
Breakthrough! (x2)
Breakthrough!
Follow-up, follow-up...
Finished sending out the certificates.
Sent some really important messages.
Got back from a contact.
Still finalizing certificates...
Worked on finalizing the certificates and gave some feedback for the reel.
Oh, it happened alright! It was a massive success, thank you to everyone who attended!
Everything seems to be in place...
First event in some time coming up very soon!
One of our smaller events had a lot of progress happen pretty spontaneously, and sent out an important message.
Did some organisational work and had a productive meeting.
Did some organisational work.
Did some organisational work, had a productive-ish meeting and got some more great advice!
Did some organisational work and got some great advice!
Had a productive meeting.
Re-scheduled a meeting.
Did some organisational work and had a meeting.
Did some organisational work.
Did the arithmetic mean of organisational work between Mar 22, 2023 and Mar 24, 2023.
Did a lot of organisational work.
Did some organisational work.
Did some organisational work.
Had two meetings and did some organisational work.
Did some organisational work.
Volunteered with OptX + two other students for Bridges of Giving. An incredibly fulfilling experience to say the least.
Did a lot of organisational work. Really productive day for this project!
Did some organisational work.
Had a productive meeting and did some organisational work.
Did some organisational work.
Another meeting - wrapped up the discussion (mostly) for this year's plan and organised the Notion accordingly.
Had a fruitful dinner meeting!
Had a productive conversation!
Discussed next meeting.
Well, I initially thought that I would just be a volunteer for OptX's The Symposium 1.0, but roughly a day before the event (Jan 07, 2023), I became one of the newest committee member. In the end, The Symposium 1.0 was an incredible success. Seeing it all unfold was one of the greatest moments in my life.
Dec 29, 2022-present
A cold email led to me and another person co-founding EA UAE. Trying to make this as successful as possible.
Sent out message(s).
Did some organisational work.
Did some organisational work.
Did some organisational work. Going to go ahead with outreach + social media work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Successful meeting!
Got a meeting mostly organised.
Sent an email.
Did some organisational work.
Got a Graphic Designer on board!
Had a productive meeting and thinking about the next meet-up.
Our first event happened on Apr 10, 2023!
Did some organisational work (we might get a graphic designer on board!)
I think we're good to go!
Got the poster and form out - going to check the situation tomorrow and (mostly regardless) finalize everything.
Did some organisational work.
Postponed - but it'll happen.
I think we have a winner, folks...
Did some organisational work.
Did some organisational work - closing in on the actual booking.
Did some organisational work.
Short-listed the restaurant!
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Communication work and a meeting with EA NYUAD!
Finished meeting notes for yesterday's introductory meeting.
Had a stellar meeting with EA AUS for our introductory meeting!
Did some organisational work.
We've scheduled the introductory meeting for Saturday. Hope to see everyone there soon!
Had a great discussion with the executive board and got the introduction meeting date and time mostly sorted out.
Did some organisational work.
Did some organisational work.
Got a great meeting and some communication in!
Did some organisational work for tomorrow.
Did some organisational work.
Scheduled a meeting.
Did some organisational work and replied to an email.
Did some organisational work. Instagram page is much more lively now!
Did some organisational work.
Did some organisational work.
Had two productive meetings.
Had a productive meeting.
Sent out the Airtable and, in general, got a lot of work done for this project!
For now, finished with Airtable.
Figured out how to get data for Airtable and got started with a post.
Had a productive meeting!
Sent out a message.
Sent out an important email.
Still working with Airtable.
Worked with Airtable.
I think cold emails are an incredibly powerful tool that must be used responsibly. Before this, I thought that I was the "king of cold emails", as it led to the Effective Altruism Data and LPP project. However, I got dethroned when someone cold emailed after seeing this EA Forum question that I wrote quite some time back.
What was originally me being pessimistic about re-starting EA Dubai led to meetings with EA AUS, EA NYUAD and even an advisor from CEA! So far, we've gotten some EA AUS and EA NYUAD members to join us - and we're on the look out for someone else to help lead this project with us! I'm really excited to see where this project is after exactly half a year (July 14, 2023)!
Jul 04, 2022-present
Trying to learn the linear algebra and multivariate calculus behind machine learning.
Continued with Week 3.
Continued with Week 3.
"Continued" with Week 3.
Continued with Week 3.
"Continued" with the course.
"Continued" with the course.
Finally finished week 1 after finishing week 2.
Figured out the cov_naive(x)
function!
Trying to finish week 1.
Finished with week 2, for the most part.
Finished my programming assignment for week 2!
Continued with the course.
Continued with the course. My programming assignment for week 2 needs a lot more work (and I haven't even finished my week 1 programming assignment...).
Continued with the course.
Continued with the course.
Continued with the course.
Continued with the course.
Continued with the course.
Continued with the course.
Continued with the course.
Continued with the course.
Continued with the course.
Continued with the course.
Continued with the course.
Made good progress on the programming assignment for Week 1.
Continued with the course.
Continued with the course.
Continued with the course.
"Continued" with the course.
Continued with the course.
Continued with the course.
Continued with the course.
"Continued" with the course.
Continued with the course.
"Continued" with the course.
"Continued" with the course.
"Continued" with the course.
"Continued" with the course.
Continued with Week 1 and got 100% on the practice quiz!
Continued with Week 1.
Got started with Week 1 of Principal Component Analysis.
Finished with Week 6 and hence finished with the multivariate calculus course! Will (hopefully) start Principal Component Analysis on Jan 2023.
Nearly finished with Week 6.
Finished with Week 5.
Continued with Week 5, nearly done after passing a really hard assignment.
Continued with Week 5.
"Continued" with "Week 5".
"Continued" with "Week 5".
"Continued" with "Week 5".
Continued with Week 5.
"Continued" with "Week 5".
Continued with Week 5.
Continued with Week 5.
Continued with Week 5.
Continued with Week 5.
Continued with Week 5.
Got started with Week 5.
Finished with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4 and got 95% on my practice quiz on the first attempt!
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Got started with Week 4.
Got started with Week 4.
Finished with Week 3! Here's my backpropagation submission:
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
"Continued" with Week 3.
Continued with Week 3 and got 100% on the practice quiz!
Continued (?) with Week 3.
Continued (?) with Week 3.
Continued with Week 3.
Got started with Week 3.
Finished with Week 2 and got 100% on the practice quiz!
Continued with Week 2. Nearly done.
Continued with Week 2 and got 100% on the practice quiz!
Continued with Week 2 and learnt about the Hessian.
Continued with Week 2.
Continued with Week 2.
Continued with Week 2.
Continued with Week 2.
Continued with Week 2.
Continued with Week 2 and got 100% on the practice quiz!
Continued with Week 2 and learnt about the Jacobian.
Got started with Week 2.
Finished with Week 1 and got 100% on the final quiz!
Continued with Week 1. Nearly (nearly) done.
Continued with Week 1. Nearly done.
Continued with Week 1.
Continued with Week 1.
Continued with Week 1.
Finished and earned my certificate for the Linear Algebra course!
Got started with the final assessment for linear algebra.
Finished the last programming assignment for Week 5 and continued with Week 1 (Calculus), going to finish the linear algebra course tomorrow!
Continued with Week 5 and Week 1 (Calculus).
Continued with Week 5 and learnt about PageRank. Lots to finish up tomorrow (and review simultaneously) so I can focus on multivariate calculus.
Continued with Week 5 and learnt about eigenbasis.
Continued with Week 5 after passing the second eigenvector quiz.
Continued with Week 5.
Continued with Week 5 (LA) and got started with the multivariate calculus (MC) course!
Continued with Week 5 and finally learnt what eigenvalues are!
Continued with Week 5. I finally know, at least on a surface level, what eigenvectors are. But what about eigenvalues?
Got started with Week 5.
Finished with Week 4.
Nearly finished with Week 4.
Continued with Week 4 and learnt about transforming a matrix in another plane (in an easier way). I'm going to miss David Dye, he was a phenomenal lecturer in this course.
Continued with Week 4 and got a perfect score on my Gram-Schmidt assignement on first submit.
Continued with Week 4 and learnt about the Gram-Schmidt process.
Continued with Week 4 and learnt about transposing a matrix and orthonormal matrices.
Continued with Week 4.
Just passed the hard practice test for this week on first attempt.
Got started with Week 4 and learnt about Einstein's summation convention and symmetry with the dot product.
Finished with Week 3.
Nearly finished with Week 3.
Learnt about matrix inverses and Gaussian Elimination.
Finished with the matrix transformation quiz.
Learnt about matrix transformations.
Got started with week 3 with matrices.
Finished with week 2!
Learnt about changing basis and got another 100%!
Finished with week 1 (the reply thing wasn't optional lol), learnt about the dot product with the cosine rule, projects and got 100% on the quiz!
Learnt about operations, modulus and dot product.
Got started with the course!
Jan 20, 2022-present
I got accepted to beta read Holden Karnofsky's articles for his blog, Cold Takes. Trying to be as useful as I can be! Note that I only update this log when I fully finish proof-reading and when the post has been published. Currently an occasional project.
Finished my eighth proof-reading. The link to the post will be here once done.
Finished my seventh proof-reading (possibly my last for this year - so grateful to have been a part of this). The link to the post will be here once done.
Finished my sixth proof-reading (although I unfortunately missed the deadline by a bit). The link to the post will be here once done.
Finished my fifth proof-reading. The link to the post will be here once done.
Along with other beta-readers, I got appreciated in the latest Cold Takes post!
Been a while, but finished my fourth proof-reading. The link to the post will be here once done.
Finished my third proof-reading. The link to the blog post will be here once done.
Finished my second proof-reading. The link to the blog post will be here once done.
Got accepted (!) and finished proof-reading. The link to the blog post will be here when it's done (for privacy reasons).
Nov 13, 2021-present
Trying to do a problem every day. All of the general problems are done in Python.
class Solution:
def numEquivDominoPairs(self, dominoes: List[List[int]]) -> int:
count = 0
for i in range(len(dominoes)):
for j in range(i+1, len(dominoes)):
if (dominoes[i][0] == dominoes[j][0] and dominoes[i][1] == dominoes[j][1]) or (dominoes[i][0] == dominoes[j][1] and dominoes[i][1] == dominoes[j][0]):
count += 1
return count
class Solution:
def differenceOfDistinctValues(self, grid: List[List[int]]) -> List[List[int]]:
def getTopLeft(grid, r, c):
res = []
r -= 1
c -= 1
while r >= 0 and c >= 0:
res.append(grid[r][c])
r -= 1
c -= 1
return len(set(res))
def getBottomRight(grid, r, c):
res = []
r += 1
c += 1
while r < len(grid) and c < len(grid[0]):
res.append(grid[r][c])
r += 1
c += 1
return len(set(res))
res = []
for i in range(len(grid)):
temp = []
for j in range(len(grid[0])):
temp.append(abs(getTopLeft(grid, i, j) - getBottomRight(grid, i, j)))
res.append(temp)
return res
/**
* @return {number}
*/
var argumentsLength = function(...args) {
return args.length;
};
/**
* argumentsLength(1, 2, 3); // 3
*/
class Solution:
def largestLocal(self, grid: List[List[int]]) -> List[List[int]]:
import numpy as np
grid = np.array(grid)
res = []
count = 0
while count < len(grid) - 2:
temp = []
end = 3
while end <= len(grid):
temp.append(np.amax(grid[count:count+3, end-3:end]))
end += 1
res.append(temp)
count += 1
return res
class Solution:
def countQuadruplets(self, nums: List[int]) -> int:
count = 0
for i in range(len(nums)):
for j in range(i+1, len(nums)):
for k in range(j+1, len(nums)):
for z in range(k+1, len(nums)):
if nums[i] + nums[j] + nums[k] == nums[z]:
count += 1
return count
/**
* @param {Function} fn
* @return {Function}
*/
var once = function(fn) {
count = 0
return function(...args){
if (count < 1) {
count += 1
return fn(...args)
}
}
};
/**
* let fn = (a,b,c) => (a + b + c)
* let onceFn = once(fn)
*
* onceFn(1,2,3); // 6
* onceFn(2,3,6); // returns undefined without calling fn
*/
class Solution:
def maxAscendingSum(self, nums: List[int]) -> int:
subarrs = []
for i in range(len(nums)):
subarrs_temp = [nums[i:j] for j in range(i+1, len(nums)+1)]
for k in subarrs_temp:
if sorted(k) == k and list(dict.fromkeys(k)) == k:
subarrs.append(k)
return sum(max(subarrs, key=lambda x: sum(x)))
class Solution:
def circularGameLosers(self, n: int, k: int) -> List[int]:
lst = [1]
friend = 1
count = 1
while True:
friend += count*k
if friend > n:
friend %= n
if friend == 0:
friend = n
if friend in lst:
break
else:
lst.append(friend)
count += 1
return [i for i in range(1, n+1) if i not in lst]
/**
* @param {Array} arr
* @param {number} size
* @return {Array[]}
*/
var chunk = function (arr, size) {
let iteration = Math.floor(arr.length / size);
let res = [];
let start = 0;
let count = 0;
while (count < iteration) {
let temp = [];
for (let i = start; i < start + size; i++) {
temp.push(arr[i]);
}
res.push(temp);
start += size;
count += 1;
}
let final = [];
for (let i = start; i < arr.length; i++) {
final.push(arr[i]);
}
res.push(final);
if (size == 1 || Math.floor(arr.length / size) == arr.length / size) {
res.pop();
}
return res;
};
class Solution:
def countSeniors(self, details: List[str]) -> int:
count = 0
for i in details:
if int(i[11:13]) > 60:
count += 1
return count
# Write your MySQL query statement below
SELECT teacher_id, COUNT(DISTINCT subject_id) as cnt FROM Teacher GROUP BY teacher_id;
class Solution:
def minOperations(self, s: str) -> int:
if len(s) == 1:
return 0
else:
count_1 = 0
if s[0] == '0':
compare = "1"
else:
compare = "0"
for i in range(1, len(s)):
if s[i] != compare:
count_1 += 1
if compare == "0":
compare = "1"
else:
compare = "0"
count_2 = 1
if s[0] == "0":
s = "1" + s[1:]
compare = "0"
else:
s = "0" + s[1:]
compare = "1"
for i in range(1, len(s)):
if s[i] != compare:
count_2 += 1
if compare == "0":
compare = "1"
else:
compare = "0"
return min(count_1, count_2)
class Solution:
def distinctDifferenceArray(self, nums: List[int]) -> List[int]:
return [len(set(nums[:i+1])) - len(set(nums[i+1:])) for i in range(len(nums))]
class Solution:
def minMaxDifference(self, num: int) -> int:
num_str = str(num)
max_num = max([int(num_str.replace(i, '9')) for i in num_str])
min_num = min([int(num_str.replace(i, '0')) for i in num_str])
return max_num - min_num
/**
* @return {Function}
*/
var createHelloWorld = function () {
return function (...args) {
return "Hello World";
};
};
/**
* const f = createHelloWorld();
* f(); // "Hello World"
*/
# Write your MySQL query statement below
SELECT DISTINCT employee_id, department_id FROM Employee WHERE primary_flag = 'Y';
class Solution:
def maximizeSum(self, nums: List[int], k: int) -> int:
score = 0
while k > 0:
nums.sort()
score += nums[-1]
nums[-1] += 1
k -= 1
return score
class Solution:
def minAbsoluteSumDiff(self, nums1: List[int], nums2: List[int]) -> int:
if nums1 == nums2:
return 0
else:
index = max(range(len(nums2)), key=lambda x: abs(nums1[x] - nums2[x]))
nums1_copy = nums1.copy()
nums1_copy.remove(nums1[index])
replacement = min(nums1_copy, key=lambda x: abs(x - nums2[index]))
nums1[index] = replacement
return sum([abs(nums1[i] - nums2[i]) for i in range(len(nums2))])
class Solution:
def isWinner(self, player1: List[int], player2: List[int]) -> int:
score_1 = player1[0]
score_2 = player2[0]
if len(player1) > 1:
if player1[0] == 10:
score_1 += 2*player1[1]
else:
score_1 += player1[1]
if player2[0] == 10:
score_2 += 2*player2[1]
else:
score_2 += player2[1]
for i in range(2, len(player1)):
if 10 in player1[i-2:i]:
score_1 += 2*player1[i]
else:
score_1 += player1[i]
for i in range(2, len(player2)):
if 10 in player2[i-2:i]:
score_2 += 2*player2[i]
else:
score_2 += player2[i]
if score_1 > score_2:
return 1
elif score_2 > score_1:
return 2
else:
return 0
class Solution:
def findDelayedArrivalTime(self, arrivalTime: int, delayedTime: int) -> int:
return (arrivalTime + delayedTime) % 24
class Solution:
def sumOfMultiples(self, n: int) -> int:
return sum([i for i in range(1, n+1) if i % 3 == 0 or i % 5 == 0 or i % 7 == 0])
Tried my hand at Smallest Number in Infinite Set.
Finished Last Stone Weight:
class Solution:
def lastStoneWeight(self, stones: List[int]) -> int:
stones.sort(reverse=True)
while len(stones) > 1:
if stones[0] == stones[1]:
stones.pop(0)
stones.pop(0)
elif stones[0] != stones[1]:
stones[0] = stones[0] - stones[1]
stones.pop(1)
stones.sort(reverse=True)
if len(stones) == 0:
return 0
else:
return stones[0]
/**
* @param {number[]} arr
* @param {Function} fn
* @return {number[]}
*/
var filter = function (arr, fn) {
let res = [];
for (let i = 0; i < arr.length; i++) {
if (fn(arr[i], i)) {
res.push(arr[i]);
}
}
return res;
};
/**
* @param {number[]} arr
* @param {Function} fn
* @return {number[]}
*/
var map = function (arr, fn) {
for (let i = 0; i < arr.length; i++) {
arr[i] = fn(arr[i], i);
}
return arr;
};
class Solution:
def maxDivScore(self, nums: List[int], divisors: List[int]) -> int:
res_temp = []
for i in divisors:
count = 0
for j in nums:
if j % i == 0:
count += 1
res_temp.append((i, count))
res_temp.sort()
return max(res_temp, key=lambda x: x[1])[0]
class Solution:
def rowAndMaximumOnes(self, mat: List[List[int]]) -> List[int]:
return [mat.index(max(mat, key=lambda x: x.count(1))), max(mat, key=lambda x: x.count(1)).count(1)]
class Solution:
def findColumnWidth(self, grid: List[List[int]]) -> List[int]:
cols = []
j = 0
while j < len(grid[0]):
col = []
for i in grid:
col.append(str(i[j]))
cols.append(col)
j += 1
return [len(max(i, key=lambda x: len(x))) for i in cols]
/**
* @param {number} n
* @return {Function} counter
*/
var createCounter = function (n) {
count = -1;
return function () {
count += 1;
return n + count;
};
};
/**
* const counter = createCounter(10)
* counter() // 10
* counter() // 11
* counter() // 12
*/
/**
* @param {Function[]} functions
* @return {Function}
*/
var compose = function (functions) {
return function (x) {
functions.reverse();
let num = x;
for (let i = 0; i < functions.length; i++) {
num = functions[i](num);
}
return num;
};
};
/**
* const fn = compose([x => x + 1, x => 2 * x])
* fn(4) // 9
*/
class Solution:
def decompressRLElist(self, nums: List[int]) -> List[int]:
res = []
for i in range(0, len(nums), 2):
res.extend([nums[i + 1]] * nums[i])
return res
class Solution:
def diagonalPrime(self, nums: List[List[int]]) -> int:
def is_prime(num):
if num <= 1:
return False
for i in range(2, int(num**0.5)+1):
if num % i == 0:
return False
return True
primes = []
for i in range(len(nums)):
if is_prime(nums[i][len(nums) - i - 1]):
primes.append(nums[i][len(nums) - i - 1])
if is_prime(nums[i][i]):
primes.append(nums[i][i])
return max(primes, default=0)
class Solution:
def frequencySort(self, nums: List[int]) -> List[int]:
nums.sort(reverse=True)
return sorted(nums, key=lambda x: nums.count(x))
Close to finishing Check if Binary String Has at Most One Segment of Ones.
class Solution:
def rearrangeCharacters(self, s: str, target: str) -> int:
if len(s) < len(target):
return 0
li = [i for i in s if i in target]
if len(li) < len(target):
return 0
elif False in [i in li for i in target]:
return 0
dict_li = {i: li.count(i) // target.count(i) for i in set(li)}
return min(dict_li.values(), default=0)
class Solution:
def decode(self, encoded: List[int], first: int) -> List[int]:
res = [first]
for i in range(len(encoded)):
res.append(res[i] ^ encoded[i])
return res
class Solution:
def findTheLongestBalancedSubstring(self, s: str) -> int:
if len(s) % 2 == 0:
for i in range(len(s), 1, -2):
if "0"*(i // 2) + "1"*(i // 2) in s:
return i
else:
return 0
else:
for i in range(len(s)-1, 1, -2):
if "0"*(i // 2) + "1"*(i // 2) in s:
return i
else:
return 0
class Solution:
def minNumber(self, nums1: List[int], nums2: List[int]) -> int:
combined_nums = [i for i in nums1 if i in nums2]
min_combined = min(combined_nums, default=1000000)
min_1 = int(str(min(nums1)) + str(min(nums2)))
min_2 = int(str(min(nums2)) + str(min(nums1)))
return min(min_combined, min_1, min_2)
class ParkingSystem:
def __init__(self, big: int, medium: int, small: int):
self.max_big = big
self.max_med = medium
self.max_small = small
def addCar(self, carType: int) -> bool:
if carType == 1:
if self.max_big >= 1:
self.max_big -= 1
return True
else:
return False
elif carType == 2:
if self.max_med >= 1:
self.max_med -= 1
return True
else:
return False
else:
if self.max_small >= 1:
self.max_small -= 1
return True
else:
return False
# Your ParkingSystem object will be instantiated and called as such:
# obj = ParkingSystem(big, medium, small)
# param_1 = obj.addCar(carType)
class Solution:
def kItemsWithMaximumSum(self, numOnes: int, numZeros: int, numNegOnes: int, k: int) -> int:
lst = []
for i in range(numOnes):
lst.append(1)
for i in range(numZeros):
lst.append(0)
for i in range(numNegOnes):
lst.append(-1)
lst = sorted(lst, reverse=True)
return sum(lst[:k])
class Solution:
def checkXMatrix(self, grid: List[List[int]]) -> bool:
for i in range(len(grid)):
for j in range(len(grid)):
if i == j:
if grid[i][j] == 0:
return False
elif i + j == len(grid) - 1:
if grid[i][j] == 0:
return False
else:
if grid[i][j] != 0:
return False
return True
class Solution:
def maximumPopulation(self, logs: List[List[int]]) -> int:
births = [i[0] for i in logs]
deaths = [i[1] for i in logs]
count = 0
res = {}
for i in range(1950, 2051):
count += births.count(i)
count -= deaths.count(i)
res[i] = count
return max(res.items(), key=lambda x: x[1])[0]
class Codec:
def encode(self, longUrl: str) -> str:
self.count = 0
self.url = {}
self.url[longUrl] = str(self.count)
self.count += 1
return self.url[longUrl]
def decode(self, shortUrl: str) -> str:
return list(self.url.keys())[list(self.url.values()).index(shortUrl)]
# Your Codec object will be instantiated and called as such:
# codec = Codec()
# codec.decode(codec.encode(url))
class Solution:
def isMonotonic(self, nums: List[int]) -> bool:
if len(set(nums)) == 1:
return True
else:
while True:
if nums[0] > nums[1]:
for i in range(2, len(nums)):
if nums[i] > nums[i - 1]:
return False
return True
elif nums[0] < nums[1]:
for i in range(2, len(nums)):
if nums[i] < nums[i - 1]:
return False
return True
else:
nums = nums[1:]
class Solution:
def maxRepeating(self, sequence: str, word: str) -> int:
count = 0
copy = word
while word in sequence or word == sequence:
word += copy
count += 1
return count
class Solution:
def findRotation(self, mat: List[List[int]], target: List[List[int]]) -> bool:
import numpy as np
matrix = np.array(mat)
first_rotation = np.rot90(matrix)
second_rotation = np.rot90(first_rotation)
third_rotation = np.rot90(second_rotation)
if (matrix.tolist() == target) or (first_rotation.tolist() == target) or (second_rotation.tolist() == target) or (third_rotation.tolist() == target):
return True
else:
return False
class Solution:
def validMountainArray(self, arr: List[int]) -> bool:
if len(arr) < 3:
return False
elif sorted(arr) == arr or sorted(arr, reverse=True) == arr:
return False
else:
for mountain_index in range(2, len(arr)):
elem_before = arr[:mountain_index]
elem_after = arr[mountain_index:]
if (len(elem_before) == len(set(elem_before)) and len(elem_after) == len(set(elem_after))) and (sorted(elem_before) == elem_before and sorted(elem_after, reverse=True) == elem_after):
return True
else:
return False
Got started with Valid Mountain Array. Nearly done.
Finished Pass the Pillow:
class Solution:
def passThePillow(self, n: int, time: int) -> int:
res = 1
temp = 1
bounce = False
while temp <= time:
if res < n and not bounce:
res += 1
if res >= n:
bounce = True
elif res == 1:
bounce = False
res += 1
else:
res -= 1
temp += 1
return res
class Solution:
def evenOddBit(self, n: int) -> List[int]:
binary = str(bin(n))[2:][::-1]
return [len([i for i in range(len(binary)) if binary[i] == '1' and i % 2 == 0]), len([i for i in range(len(binary)) if binary[i] == '1' and i % 2 != 0])]
# Please write a DELETE statement and DO NOT write a SELECT statement.
# Write your MySQL query statement below
DELETE p1 FROM Person p1, Person p2 WHERE p1.Email = p2.Email AND p1.Id > p2.Id
# Write your MySQL query statement below
SELECT FirstName, LastName, City, State FROM Person
LEFT JOIN Address
ON Person.PersonId = Address.PersonId;
class Solution:
def allCellsDistOrder(self, rows: int, cols: int, rCenter: int, cCenter: int) -> List[List[int]]:
res = []
for i in range(rows):
for j in range(cols):
res.append([i, j])
res = sorted(res, key=lambda x: abs(x[0] - rCenter) + abs(x[1] - cCenter))
return res
class Trie:
def __init__(self):
self.words = []
def insert(self, word: str) -> None:
self.words.append(word)
def search(self, word: str) -> bool:
return word in self.words
def startsWith(self, prefix: str) -> bool:
if True in [i.startswith(prefix) for i in self.words]:
return True
else:
return False
# Your Trie object will be instantiated and called as such:
# obj = Trie()
# obj.insert(word)
# param_2 = obj.search(word)
# param_3 = obj.startsWith(prefix)
Got started with Evaluate Boolean Binary Tree.
Happy Pi Day! Finished Count the Number of Vowel Strings in Range:
class Solution:
def vowelStrings(self, words: List[str], left: int, right: int) -> int:
return len([i for i in words[left:right+1] if i[0] in 'aeiouAEIOU' and i[-1] in 'aeiouAEIOU'])
class Solution:
def sortEvenOdd(self, nums: List[int]) -> List[int]:
odd_int = [nums[i] for i in range(len(nums)) if i % 2 != 0]
even_int = [nums[i] for i in range(len(nums)) if i % 2 == 0]
odd_int.sort(reverse=True)
even_int.sort()
print(odd_int, even_int)
new_num = []
for i in range(len(nums) // 2):
new_num.append(even_int[i])
new_num.append(odd_int[i])
if len(nums) % 2 != 0:
return new_num + [even_int[-1]]
else:
return new_num
class Solution:
def canBeEqual(self, target: List[int], arr: List[int]) -> bool:
if sorted(arr) == sorted(target):
return True
return False
class Solution:
def divideString(self, s: str, k: int, fill: str) -> List[str]:
temp = [s[i:i+k] for i in range(0, len(s), k)]
for i in range(len(temp)):
if len(temp[i]) != k:
temp[i] = temp[i] + fill * (k - len(temp[i]))
return temp
class Solution:
def intersection(self, nums: List[List[int]]) -> List[int]:
candidates = [i for j in nums for i in j]
res = []
for i in candidates:
if False not in [i in j for j in nums]:
res.append(i)
return sorted(set(res))
class Solution:
def convertTime(self, current: str, correct: str) -> int:
current_minutes = int(current[:2]) * 60 + int(current[3:])
correct_minutes = int(correct[:2]) * 60 + int(correct[3:])
diff = correct_minutes - current_minutes
step = 0
while diff != 0:
for i in range(diff // 60):
diff -= 60
step += 1
if diff == 0:
break
for i in range(diff // 15):
diff -= 15
step += 1
if diff == 0:
break
for i in range(diff // 5):
diff -= 5
step += 1
if diff == 0:
break
for i in range(diff // 1):
diff -= 1
step += 1
return step
class Solution:
def leftRigthDifference(self, nums: List[int]) -> List[int]:
leftSum = [sum(nums[:i]) for i in range(len(nums))]
rightSum = [sum(nums[i+1:]) for i in range(len(nums))]
return [abs(leftSum[i] - rightSum[i]) for i in range(len(nums))]
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def minDiffInBST(self, root: Optional[TreeNode]) -> int:
res = []
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, res)
traverse(tree.right, res)
traverse(root, res)
res = sorted(list(dict.fromkeys(res)))
diff = []
for i in range(len(res)):
for j in range(i+1, len(res)):
diff.append(abs(res[j] - res[i]))
return min(diff)
class Solution:
def mergeArrays(self, nums1: List[List[int]], nums2: List[List[int]]) -> List[List[int]]:
res = []
for i in nums1:
if i[0] in [j[0] for j in nums2]:
res.append([i[0], i[1] + [j for j in nums2 if j[0] == i[0]][0][1]])
else:
res.append([i[0], i[1]])
for j in nums2:
if j[0] not in [i[0] for i in nums1]:
res.append([j[0], j[1]])
return sorted(res, key=lambda x: x[0])
class Solution:
def calculate(self, s: str) -> int:
s = "".join([i for i in s if i != " "])
def get_operands(st, operator):
operand_1 = ""
operand_2 = ""
start_index = 0
end_index = 0
for i in range(st.index(operator) - 1, -1, -1):
if st[i] in "+-/*":
break
operand_1 = st[i : st.index(operator)]
start_index = i
for i in range(st.index(operator) + 1, len(st)):
if st[i] in "+-/*":
break
operand_2 = st[st.index(operator) + 1 : i + 1]
end_index = i
return (operand_1, operand_2, start_index, end_index)
if "*" in s and "/" in s:
if s.index("*") < s.index("/"):
while "*" in s:
print("*")
operand_1, operand_2, start_index, end_index = get_operands(s, "*")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) * int(operand_2))
+ s[end_index + 1 :]
)
while "/" in s:
print("/")
operand_1, operand_2, start_index, end_index = get_operands(s, "/")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) // int(operand_2))
+ s[end_index + 1 :]
)
else:
while "/" in s:
print("/")
operand_1, operand_2, start_index, end_index = get_operands(s, "/")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) // int(operand_2))
+ s[end_index + 1 :]
)
while "*" in s:
print("*")
operand_1, operand_2, start_index, end_index = get_operands(s, "*")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) * int(operand_2))
+ s[end_index + 1 :]
)
else:
while "*" in s:
print("*")
operand_1, operand_2, start_index, end_index = get_operands(s, "*")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) * int(operand_2))
+ s[end_index + 1 :]
)
while "/" in s:
print("/")
operand_1, operand_2, start_index, end_index = get_operands(s, "/")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) // int(operand_2))
+ s[end_index + 1 :]
)
if "+" in s and "-" in s:
if s.index("+") < s.index("-"):
while "+" in s and s.index("+") != 0:
print("+")
operand_1, operand_2, start_index, end_index = get_operands(s, "+")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) + int(operand_2))
+ s[end_index + 1 :]
)
while "-" in s and s.index("-") != 0:
print("-")
operand_1, operand_2, start_index, end_index = get_operands(s, "-")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) - int(operand_2))
+ s[end_index + 1 :]
)
print(s)
else:
while "-" in s and s.index("-") != 0:
print("-")
operand_1, operand_2, start_index, end_index = get_operands(s, "-")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) - int(operand_2))
+ s[end_index + 1 :]
)
print(s)
while "+" in s and s.index("+") != 0:
print("+")
operand_1, operand_2, start_index, end_index = get_operands(s, "+")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) + int(operand_2))
+ s[end_index + 1 :]
)
else:
while "-" in s and s.index("-") != 0:
print("-")
operand_1, operand_2, start_index, end_index = get_operands(s, "-")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) - int(operand_2))
+ s[end_index + 1 :]
)
print(s)
while "+" in s and s.index("+") != 0:
print("+")
operand_1, operand_2, start_index, end_index = get_operands(s, "+")
print(
operand_1,
operand_2,
start_index,
end_index,
s[start_index : end_index + 1],
)
s = (
s[:start_index]
+ str(int(operand_1) + int(operand_2))
+ s[end_index + 1 :]
)
return int(s)
class Solution:
def minimumMoves(self, s: str) -> int:
if 'X' not in s:
return 0
else:
count = 0
while 'X' in s:
ind = s.index('X')
s_arr = [i for i in s]
s_arr[ind:ind+3] = ['O', 'O', 'O']
count += 1
s = "".join(s_arr)
return count
class Solution:
def canBeIncreasing(self, nums: List[int]) -> bool:
def is_strictly_increasing(lst):
for i in range(1, len(lst)):
if lst[i - 1] >= lst[i]:
return False
return True
if is_strictly_increasing(nums):
return True
for i in range(len(nums)):
if is_strictly_increasing(nums[:i] + nums[i+1:]):
return True
return False
class Solution:
def findSubarrays(self, nums: List[int]) -> bool:
sums = []
for i in range(len(nums) - 1):
if sum(nums[i:i+2]) in sums:
return True
else:
sums.append(sum(nums[i:i+2]))
return False
class Solution:
def findTheArrayConcVal(self, nums: List[int]) -> int:
concatenation_value = 0
while len(nums) > 0:
if len(nums) > 1:
concatenation_value += int(str(nums[0]) + str(nums[-1]))
del nums[0]
del nums[-1]
else:
concatenation_value += nums[0]
del nums[0]
return concatenation_value
class Solution:
def summaryRanges(self, nums: List[int]) -> List[str]:
nested_nums = []
res = []
for i in nums:
if i not in [j for k in nested_nums for j in k]:
nested_lst = []
count = i
while count in nums:
nested_lst.append(count)
count += 1
nested_nums.append(nested_lst)
for i in nested_nums:
if len(i) == 1:
res.append(str(i[0]))
else:
res.append(f'{min(i)}->{max(i)}')
return res
class Solution:
def maxNumberOfBalloons(self, text: str) -> int:
chars = [i for i in text if i in "balloon"]
chars = {i: chars.count(i) for i in dict.fromkeys(chars)}
count = 0
if 'b' not in chars or 'a' not in chars or 'l' not in chars or 'o' not in chars or 'n' not in chars:
return 0
while True:
if chars['b'] >= 1 and chars['a'] >= 1 and chars['l'] >= 2 and chars['o'] >= 2 and chars['n'] >= 1:
count += 1
chars['b'] -= 1
chars['a'] -= 1
chars['l'] -= 2
chars['o'] -= 2
chars['n'] -= 1
else:
break
return count
class Solution:
def countHillValley(self, nums: List[int]) -> int:
filtered_list = []
last_num = None
for i in nums:
if i != last_num:
filtered_list.append(i)
last_num = i
count = 0
for i in range(1, len(filtered_list) - 1):
if filtered_list[i] > filtered_list[i-1] and filtered_list[i] > filtered_list[i+1]:
count += 1
elif filtered_list[i] < filtered_list[i-1] and filtered_list[i] < filtered_list[i+1]:
count += 1
return count
class Solution:
def subsetXORSum(self, nums: List[int]) -> int:
from itertools import combinations
total = 0
sublists = []
for i in range(2, len(nums) + 1):
sublists.append(list(combinations(nums, i)))
for i in sublists:
for j in i:
eval_str = ""
for k in j:
eval_str += str(k) + "^"
total += eval(eval_str[:-1])
return total + sum(nums)
class Solution:
def distinctIntegers(self, n: int) -> int:
has_stopped = False
numbers_count = [n]
numbers = [n]
while not has_stopped:
new_numbers = []
count = 0
for i in range(1, n+1):
if True in [j % i == 1 for j in numbers]:
new_numbers.append(i)
count += 1
if count == 0:
has_stopped = True
numbers_count.extend(new_numbers)
numbers = new_numbers
return len(set(numbers_count))
class Solution:
def pickGifts(self, gifts: List[int], k: int) -> int:
import math
while k > 0:
gifts = sorted(gifts)
gifts[-1] = math.floor(math.sqrt(gifts[-1]))
k -= 1
return sum(gifts)
class Solution:
def separateDigits(self, nums: List[int]) -> List[int]:
res = []
for i in nums:
for j in str(i):
res.append(int(j))
return res
class Solution:
def countGoodTriplets(self, arr: List[int], a: int, b: int, c: int) -> int:
count = 0
for i in range(len(arr)):
for j in range(i+1, len(arr)):
for k in range(j+1, len(arr)):
if abs(arr[i] - arr[j]) <= a and abs(arr[j] - arr[k]) <= b and abs(arr[i] - arr[k]) <= c:
count += 1
return count
class Solution:
def countElements(self, nums: List[int]) -> int:
return len([i for i in nums if True in [j > i for j in nums] and True in [k < i for k in nums]])
class Solution:
def getCommon(self, nums1: List[int], nums2: List[int]) -> int:
if nums1[-1] < nums2[0] or nums2[-1] < nums2[0]:
return -1
for i in nums1:
if i in nums2:
return i
return -1
class Solution:
def largestInteger(self, num: int) -> int:
num = list(str(num))
for i in range(len(num)):
for j in range(i, len(num)):
if num[j] > num[i] and int(num[j]) % 2 == int(num[i]) % 2:
num[i], num[j] = num[j], num[i]
return int("".join(num))
class Solution:
def maximumUnits(self, boxTypes: List[List[int]], truckSize: int) -> int:
boxes = sorted(boxTypes, key=lambda x: x[1], reverse=True)
sum_of_boxes = 0
total = 0
while sum_of_boxes <= truckSize and len(boxes) > 0:
if sum_of_boxes + boxes[0][0] > truckSize:
total += (truckSize - sum_of_boxes) * boxes[0][1]
return total
else:
sum_of_boxes += boxes[0][0]
total += (boxes[0][0] * boxes[0][1])
del boxes[0]
return total
class Solution:
def maxDistance(self, colors: List[int]) -> int:
distances = []
for i in range(len(colors)):
for j in range(len(colors)):
if colors[i] != colors[j]:
distances.append(abs(i - j))
return max(distances)
Couldn't solve a problem today, but that's okay.
Finished Alternating Digit Sum:
class Solution:
def alternateDigitSum(self, n: int) -> int:
digit_sum = 0
sign = 1
for i in str(n):
digit_sum += sign*(int(i))
sign *= -1
return digit_sum
class Solution:
def findKDistantIndices(self, nums: List[int], key: int, k: int) -> List[int]:
k_indices = []
for i in range(len(nums)):
for j in range(len(nums)):
if abs(i - j) <= k and nums[j] == key:
k_indices.append(i)
return sorted(list(dict.fromkeys(k_indices)))
class Solution:
def getMaximumGenerated(self, n: int) -> int:
if n == 0:
return 0
array = [0] + [1] + [0 for i in range(n-1)]
for i in range(2, n+1):
if i % 2 == 0:
array[i] = array[i // 2]
else:
array[i] = array[i // 2] + array[(i // 2) + 1]
return max(array)
class Solution:
def closetTarget(self, words: List[str], target: str, startIndex: int) -> int:
if target not in words:
return -1
else:
index = startIndex
backward_index = startIndex
count = 0
while words[index] != target and words[backward_index] != target:
count += 1
if index < len(words) - 1:
index += 1
else:
index = 0
backward_index -= 1
return count
class Solution:
def categorizeBox(self, length: int, width: int, height: int, mass: int) -> str:
is_bulky = False
is_heavy = False
if length >= 1e4 or width >= 1e4 or height >= 1e4 or mass >= 1e4:
is_bulky = True
elif (length * width * height) >= 1e9:
is_bulky = True
if mass >= 100:
is_heavy = True
if is_bulky and is_heavy:
return "Both"
elif is_bulky:
return "Bulky"
elif is_heavy:
return "Heavy"
else:
return "Neither"
class Solution:
def differenceOfSum(self, nums: List[int]) -> int:
return abs(sum(nums) - sum([int(i) for i in "".join([str(i) for i in nums])]))
class Solution:
def maximumCount(self, nums: List[int]) -> int:
return max(len([i for i in nums if i < 0]), len([i for i in nums if i > 0]))
class Solution:
def countDigits(self, num: int) -> int:
digits = [int(i) for i in str(num)]
count = 0
for i in digits:
if num % i == 0:
count += 1
return count
class Solution:
def minDeletionSize(self, strs: List[str]) -> int:
count = 0
for i in range(len(strs[0])):
column = ""
for j in strs:
column += j[i]
if "".join(sorted(column)) != column:
count += 1
return count
class Solution:
def reorderSpaces(self, text: str) -> str:
words = [i for i in text.split(" ") if i != '']
spaces = [i for i in text if i.isspace()]
print(words, spaces)
if len(words) == 1:
return words[0] + "".join(spaces)
if len(spaces) / (len(words) - 1) == len(spaces) // (len(words) - 1):
res = ""
for i in words[:-1]:
res += i + " "*(len(spaces) // (len(words) - 1))
res += words[-1]
return res
else:
res = ""
for i in words[:-1]:
res += i + " "*(len(spaces) // (len(words) - 1))
res += (words[-1] + " "*(len(spaces) % (len(words) - 1)))
return res
class Solution:
def wordPattern(self, pattern: str, s: str) -> bool:
words = s.split(" ")
unique_words = list(dict.fromkeys(words))
count_1 = 1
print(words, unique_words)
for i in unique_words:
words = [str(count_1) if j == i else j for j in words]
count_1 += 1
letters = [i for i in pattern]
unique_letters = list(dict.fromkeys(letters))
count_2 = 1
for i in unique_letters:
letters = [str(count_2) if j == i else j for j in letters]
count_2 += 1
if words == letters:
return True
else:
return False
class Solution:
def arithmeticTriplets(self, nums: List[int], diff: int) -> int:
count = 0
for i in range(len(nums)):
for j in range(i, len(nums)):
for k in range(j, len(nums)):
if nums[j] - nums[i] == diff and nums[k] - nums[j] == diff:
count += 1
return count
from collections import Counter
class Solution:
def areAlmostEqual(self, s1: str, s2: str) -> bool:
if Counter(s1) == Counter(s2):
count = 0
for i in range(len(s2)):
if s1[i] != s2[i]:
if count == 1.0:
return False
count += 0.5
return True
return False
class Solution:
def countCharacters(self, words: List[str], chars: str) -> int:
def can_be_formed(string, chars):
if False in [i in chars for i in string]:
return False
else:
chars_list = [i for i in chars if i in string]
chars_dict = {i: chars_list.count(i) for i in sorted(chars)}
string_dict = {i: string.count(i) for i in sorted(chars)}
print(string, chars, string_dict, chars_dict)
for k, v in string_dict.items():
if chars_dict[k] < v:
return False
else:
return True
return sum([len(i) for i in words if can_be_formed(i, chars)])
class Solution:
def countVowels(self, word: str) -> int:
return sum([(i+1) * (len(word) - i) for i in range(len(word)) if word[i] in ['a', 'e', 'i', 'o', 'u']])
class Solution:
def countWords(self, words1: List[str], words2: List[str]) -> int:
res = []
for i in words1:
if words1.count(i) == 1 and words2.count(i) == 1:
res.append(i)
for i in words2:
if words1.count(i) == 1 and words2.count(i) == 1:
res.append(i)
return len(set(res))
class Solution:
def threeConsecutiveOdds(self, arr: List[int]) -> bool:
for i in range(len(arr) - 2):
if arr[i] % 2 != 0 and arr[i+1] % 2 != 0 and arr[i+2] % 2 != 0:
return True
else:
return False
class Solution:
def removeAnagrams(self, words: List[str]) -> List[str]:
while True in [sorted(words[i]) == sorted(words[i -1]) for i in range(1, len(words))]:
for i in range(1, len(words)):
if sorted(words[i]) == sorted(words[i - 1]):
del words[i]
break
else:
return words
return words
class Solution:
def minMaxGame(self, nums: List[int]) -> int:
while len(nums) > 1:
newNums = []
for i in range(0, (len(nums) // 2)):
if i % 2 == 0:
newNums.append(min(nums[2 * i], nums[(2 * i) + 1]))
else:
newNums.append(max(nums[2 * i], nums[2 * i + 1]))
nums = newNums
return nums[0]
class Solution:
def minTimeToType(self, word: str) -> int:
# Credit - https://leetcode.com/problems/minimum-time-to-type-word-using-special-typewriter/solutions/1417570/short-and-straightforward-python-solution/
time = 0
pointer = "a"
for i in word:
time_to_move = min(abs(ord(pointer) - ord(i)), abs(abs(ord(pointer) - ord(i)) - 26))
time += time_to_move + 1
pointer = i
return time
class Solution:
def countPoints(self, rings: str) -> int:
count = 0
for i in range(10):
if sorted(set([rings[j] for j in range(len(rings) - 1) if rings[j+1] == str(i)])) == ["B", "G", "R"]:
count += 1
return count
class Solution:
def numSpecial(self, mat: List[List[int]]) -> int:
count = 0
for j in range(len(mat[0])):
for k in range(len(mat)):
if mat[k][j] == 1:
if set([mat[i][j] for i in range(len(mat)) if i != k]) == {0} and set([mat[k][i] for i in range(len(mat[0])) if i != j]) == {0}:
count += 1
return count
class Solution:
def smallestValue(self, n: int) -> int:
def prime_factors(n):
prime_factors = []
for i in range(2, int(n // 2) + 1):
if n % i == 0:
for j in range(2, i):
if i % j == 0:
break
else:
copy_n = n
while copy_n % i == 0:
prime_factors.append(i)
copy_n //= i
return prime_factors
def is_prime(n):
for i in range(2, n):
if n % i == 0:
return False
return True
count = 0
while not(is_prime(n)) and count < 100:
n = sum(prime_factors(n))
count += 1
return n
class Solution:
def construct2DArray(self, original: List[int], m: int, n: int) -> List[List[int]]:
if m*n == len(original):
res = []
for i in range(m):
row = []
for j in range(n*i, n*(i+1)):
row.append(original[j])
res.append(row)
return res
else:
return []
class Solution:
def similarPairs(self, words: List[str]) -> int:
count = 0
for i in range(len(words)):
for j in range(len(words)):
if j > i and set(words[i]) == set(words[j]):
count += 1
return count
class Solution:
def deleteGreatestValue(self, grid: List[List[int]]) -> int:
pairs = []
while len([j for i in grid for j in i]) > 0:
for i in range(len(grid)):
pairs.append(max(grid[i]))
for j in range(len(grid[i])):
if grid[i][j] == max(grid[i]):
del grid[i][j]
break
return sum([max(pairs[i:i+len(grid)]) for i in range(0, len(pairs), len(grid))])
class Solution:
def digitSum(self, s: str, k: int) -> str:
while len(s) > k:
if len(s) % k != 0:
temp_s = s[:-(len(s) % k)]
print(temp_s)
splits = []
for i in range(0, len(temp_s)-1, k):
splits.append(temp_s[i:i+k])
splits.append(s[-(len(s) % k):])
s = "".join([str(sum([int(j) for j in i])) for i in splits])
else:
splits = []
for i in range(0, len(s)-1, k):
splits.append(s[i:i+k])
s = "".join([str(sum([int(j) for j in i])) for i in splits])
return s
class Solution:
def numberOfCuts(self, n: int) -> int:
if n == 1:
return 0
else:
if n % 2 == 0:
return n // 2
else:
return n
class Solution:
def isCircularSentence(self, sentence: str) -> bool:
words = sentence.split(" ")
if words[0][0] == words[-1][-1]:
for i in range(len(words) - 1):
if words[i][-1] != words[i+1][0]:
return False
else:
return True
else:
return False
class Solution:
def maximumValue(self, strs: List[str]) -> int:
max = 0
for i in strs:
if i.isdigit():
if int(i) > max:
max = int(i)
else:
if len(i) > max:
max = len(i)
return max
class Solution:
def pivotInteger(self, n: int) -> int:
# https://math.stackexchange.com/a/1842203
for i in range(1, n+1):
if (i*(i+1))//2 == ((n - i + 1)*(i+n)) // 2:
return i
else:
return -1
class Solution:
def unequalTriplets(self, nums: List[int]) -> int:
res = 0
for i in range(len(nums)):
for j in range(len(nums)):
for k in range(len(nums)):
if i < j < k:
if nums[i] != nums[j] and nums[i] != nums[k] and nums[j] != nums[k]:
res += 1
return res
class Solution:
def strongPasswordCheckerII(self, password: str) -> bool:
isStrong = False
if len(password) >= 8:
if True in [ord(i) >= 97 and ord(i) <= 122 for i in password]:
if True in [ord(i) >= 65 and ord(i) <= 90 for i in password]:
if True in [i.isdigit() for i in password]:
if True in [i in "!@#$%^&*()-+" for i in password]:
if True not in [password[i] == password[i+1] for i in range(len(password) - 1)]:
isStrong = True
return isStrong
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def hasCycle(self, head: Optional[ListNode]) -> bool:
array = []
current_pointer = head
while len(array) <= 1e6 and current_pointer:
array.append(current_pointer.val)
current_pointer = current_pointer.next
if len(array) >= 1e6:
return True
else:
return False
class Solution:
def convertTemperature(self, celsius: float) -> List[float]:
return [celsius + 273.15, celsius * 1.80 + 32.00]
class Solution:
def distinctAverages(self, nums: List[int]) -> int:
averages = set()
while len(nums) != 0:
min_num = min(nums)
nums.remove(min_num)
max_num = max(nums)
nums.remove(max_num)
averages.add((max_num + min_num) / 2)
return len(averages)
class Solution:
def applyOperations(self, nums: List[int]) -> List[int]:
for i in range(len(nums) - 1):
if nums[i] == nums[i+1]:
nums[i] *= 2
nums[i+1] = 0
count_zero = len([i for i in nums if i == 0])
return [i for i in nums if i != 0] + [0 for i in range(count_zero)]
Still working on Make The String Great.
I'll finish Make The String Great tomorrow.
Finished Merge Similar Items:
class Solution:
def mergeSimilarItems(self, items1: List[List[int]], items2: List[List[int]]) -> List[List[int]]:
first_pass = [[i[0], i[1] + sum([j[1] for j in items2 if j[0] == i[0]])] for i in items1]
second_pass = [[i[0], i[1] + sum([j[1] for j in items1 if j[0] == i[0]])] for i in items2]
temp = first_pass + second_pass
final = []
for i in temp:
if i not in final:
final.append(i)
print(first_pass, second_pass)
return sorted(final, key=lambda x: x[0])
class Solution:
def hardestWorker(self, n: int, logs: List[List[int]]) -> int:
id_time = []
for i in range(len(logs)):
if i == 0:
id_time.append((logs[i][0], logs[i][1]))
else:
id_time.append((logs[i][0], logs[i][1] - logs[i-1][1]))
return min([i[0] for i in id_time if i[1] == max([i[1] for i in id_time])])
class Solution:
def minBitFlips(self, start: int, goal: int) -> int:
start_bin = str(bin(start)[2:])
goal_bin = str(bin(goal)[2:])
if len(start_bin) < len(goal_bin):
start_bin = "0"*(len(goal_bin) - len(start_bin)) + start_bin
if len(start_bin) > len(goal_bin):
goal_bin = "0"*(len(start_bin) - len(goal_bin)) + goal_bin
print(start_bin, goal_bin)
return len([i for i in range(len(start_bin)) if start_bin[i] != goal_bin[i]])
class Solution:
def oddString(self, words: List[str]) -> str:
from collections import Counter
difference_array = [[(ord(i[j+1])-97)-(ord(i[j])-97) for j in range(len(i) - 1)] for i in words]
return words[difference_array.index(min(difference_array,key=difference_array.count))]
class Solution:
def averageValue(self, nums: List[int]) -> int:
even_three_nums = [i for i in nums if i % 6 == 0]
if len(even_three_nums) == 0:
return 0
else:
return int(sum(even_three_nums) / len(even_three_nums))
class Solution:
def findOcurrences(self, text: str, first: str, second: str) -> List[str]:
text_array = text.split()
return [text_array[i:i+3][2] for i in range(len(text_array)) if len(text_array[i:i+3]) == 3 and text_array[i:i+3][0] == first and text_array[i:i+3][1] == second]
class Solution:
def maximumProduct(self, nums: List[int]) -> int:
nums = sorted(nums)
return max(nums[0] * nums[1] * nums[len(nums) - 1], nums[len(nums) - 1] * nums[len(nums) - 2] * nums[len(nums) - 3])
class Solution:
def climbStairs(self, n: int) -> int:
import math
lowest_level = int(math.ceil(n / 2))
count = 0
res = 0
for i in range(n, lowest_level-1, -1):
res += math.comb(i, count)
count += 1
return res
class Solution:
def sumOddLengthSubarrays(self, arr: List[int]) -> int:
total = 0
for i in range(len(arr)):
for j in range(len(arr)):
if len(arr[i:j+1]) % 2 != 0:
total += sum(arr[i:j+1])
return total
Could not a finish problem today, but that's alright.
class Solution:
def maximumDifference(self, nums: List[int]) -> int:
difference = []
for i in range(len(nums)):
for j in range(len(nums)):
if i < j and nums[i] < nums[j]:
difference.append(nums[j] - nums[i])
if len(difference) == 0:
return -1
return max(difference)
class Solution:
def countPrefixes(self, words: List[str], s: str) -> int:
return len([i for i in words if i in [s[:i] for i in range(1, len(s) + 1)]])
class Solution:
def haveConflict(self, event1: List[str], event2: List[str]) -> bool:
minutes_1 = [i for i in range(60*int(event1[0][:2]) + int(event1[0][3:]), 60*int(event1[1][:2]) + int(event1[1][3:]) + 1)]
minutes_2 = [i for i in range(60*int(event2[0][:2]) + int(event2[0][3:]), 60*int(event2[1][:2]) + int(event2[1][3:]) + 1)]
if len([i for i in minutes_1 if i in minutes_2]) == 0:
return False
return True
class Solution:
def sumOfNumberAndReverse(self, num: int) -> bool:
if num == 0:
return True
for i in range(1, num):
if i + int(str(i)[::-1]) == num:
return True
return False
class Solution:
def nearestValidPoint(self, x: int, y: int, points: List[List[int]]) -> int:
valid = [i for i in points if i[0] == x or i[1] == y]
if len(valid) == 0:
return -1
return points.index(sorted([(abs(x - i[0]) + abs(y - i[1]), i) for i in valid], key=lambda x: x[0])[0][1])
class NumArray:
def __init__(self, nums: List[int]):
self.array = nums
def sumRange(self, left: int, right: int) -> int:
return sum(self.array[left:right+1])
# Your NumArray object will be instantiated and called as such:
# obj = NumArray(nums)
# param_1 = obj.sumRange(left,right)
class Solution:
def largestAltitude(self, gain: List[int]) -> int:
altitudes = [0]
for i in gain:
altitudes.append(altitudes[len(altitudes) - 1] + i)
return max(altitudes)
class Solution:
def countPairs(self, nums: List[int], k: int) -> int:
pairs = []
for i in range(len(nums)):
for j in range(len(nums)):
if i < j and nums[i] == nums[j] and (i * j) % k == 0:
pairs.append((i, j))
return len(pairs)
class Solution:
def nextGreatestLetter(self, letters: List[str], target: str) -> str:
return chr(min([i for i in [ord(i) for i in letters] if i > ord(target)])) if len([i for i in [ord(i) for i in letters] if i > ord(target)]) != 0 else letters[0]
class Solution:
def findMaxK(self, nums: List[int]) -> int:
return max([abs(i) for i in nums if -i in nums]) if len([abs(i) for i in nums if -i in nums]) != 0 else -1
Re-visiting Largest Perimeter Triangle.
Finished Find the K-Beauty of a Number:
class Solution:
def divisorSubstrings(self, num: int, k: int) -> int:
return len([str(num)[i:i+k] for i in range(len(str(num))) if int(str(num)[i:i+k]) != 0 and len(str(num)[i:i+k]) == k and num % int(str(num)[i:i+k]) == 0])
class Solution:
def sortPeople(self, names: List[str], heights: List[int]) -> List[str]:
return [i[0] for i in sorted(zip(names, heights), key=lambda x: x[1], reverse=True)]
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def findTarget(self, root: Optional[TreeNode], k: int) -> bool:
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
res = []
traverse(root, res)
for i in res:
for j in res:
if j != i:
if i + j == k:
return True
return False
class Solution:
def checkDistances(self, s: str, distance: List[int]) -> bool:
for i in sorted(set(s)):
indices = [j for j in range(len(s)) if s[j] == i]
if abs(indices[0] - indices[1]) - 1 != distance[ord(i) - 97]:
return False
return True
class Solution:
def equalFrequency(self, word: str) -> bool:
frequencies = [word.count(i) for i in sorted(set(word))]
for i in range(len(frequencies)):
frequencies_copy = frequencies[:]
if frequencies_copy[i] == 1:
frequencies_copy.pop(i)
else:
frequencies_copy[i] -= 1
if len(set(frequencies_copy)) == 1:
return True
return False
class Solution:
def commonFactors(self, a: int, b: int) -> int:
return len([i for i in range(1, max(a, b) + 1) if a % i == 0 and b % i == 0])
Could not solve a problem in time today, but that's alright.
Finished Longest Nice Substring:
class Solution:
def longestNiceSubstring(self, s: str) -> str:
if False not in [(i.upper() in s and i.lower() in s )for i in s]:
return s
temp_res = [s[i:j] for i in range(len(s)) for j in range(i + 1, len(s) + 1) if False not in [(k.upper() in s[i:j] and k.lower() in s[i:j]) for k in s[i:j]]]
if len(temp_res) == 0:
return ""
max_length = len(max(temp_res, key=lambda x: len(x)))
return min([(i, s.find(i)) for i in temp_res if len(i) == max_length], key=lambda x: x[1])[0]
Still getting there.
I'm close to a solution for Minimum Time to Type Word Using Special Typewriter.
Finished Hamming Distance:
class Solution:
def hammingDistance(self, x: int, y: int) -> int:
# https://leetcode.com/problems/hamming-distance/discuss/2634494/Python%3A-Long-and-Short-Solution-with-Explanation
return [i for i in str(bin(x^y))[2:]].count('1')
class Solution:
def findClosestElements(self, arr: List[int], k: int, x: int) -> List[int]:
temp_res = sorted([(i, abs(i - x)) for i in arr], key=lambda x: x[1])
return sorted([i[0] for i in temp_res][:k])
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def removeNthFromEnd(self, head: Optional[ListNode], n: int) -> Optional[ListNode]:
def traverse(llist, array):
if llist:
array.append(llist.val)
traverse(llist.next, array)
array = []
traverse(head, array)
array.pop(len(array) - n)
# https://stackoverflow.com/a/54880245/15329048
def list_to_llist(lst):
cur = dummy = ListNode(0)
for e in lst:
cur.next = ListNode(e)
cur = cur.next
return dummy.next
return list_to_llist(array)
class Solution:
def checkStraightLine(self, coordinates: List[List[int]]) -> bool:
# https://leetcode.com/problems/check-if-it-is-a-straight-line/discuss/2483779/Python-oror-Using-For-Loop-ororEasy-Undestanding
(x0, y0), (x1, y1) = coordinates[0], coordinates[1]
for i in range(2, len(coordinates)):
x, y = coordinates[i]
if (x0 - x1) * (y1 - y) != (x1 - x) * (y0 - y1):
return False
return True
class MyHashMap:
def __init__(self):
self.hashmap = []
def put(self, key: int, value: int) -> None:
keys = [i[0] for i in self.hashmap]
if key in keys:
index = keys.index(key)
self.hashmap[index][1] = value
else:
self.hashmap.append([key, value])
def get(self, key: int) -> int:
keys = [i[0] for i in self.hashmap]
if key in keys:
index = keys.index(key)
return self.hashmap[index][1]
else:
return -1
def remove(self, key: int) -> None:
keys = [i[0] for i in self.hashmap]
if key in keys:
index = keys.index(key)
self.hashmap.pop(index)
# Your MyHashMap object will be instantiated and called as such:
# obj = MyHashMap()
# obj.put(key,value)
# param_2 = obj.get(key)
# obj.remove(key)
class Solution:
def countKDifference(self, nums: List[int], k: int) -> int:
# https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/discuss/2618368/Simple-Python-Solution-O(n2)
count = 0
for i in range(len(nums)):
for j in range(i,len(nums)):
if abs(nums[i] - nums[j]) == k:
count += 1
return count
class Solution:
def concatenatedBinary(self, n: int) -> int:
string = ""
for i in range(1, n+1):
string += bin(i)[2:]
return int(string, 2) % (10**9 + 7)
class Solution:
def sumEvenAfterQueries(self, nums: List[int], queries: List[List[int]]) -> List[int]:
# Time Limit Exceeded
res = []
for i in queries:
nums[i[1]] += i[0]
res.append(sum([j for j in nums if j % 2 == 0]))
return res
class Solution:
def smallestEvenMultiple(self, n: int) -> int:
if n % 2 == 0:
return n
else:
return n * 2
class Solution:
def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]:
from collections import Counter
res = []
nums1, nums2 = Counter(nums1), Counter(nums2)
for element in nums1:
res += [element] * min(nums1[element], nums2[element])
return res
class Solution:
def minimumDifference(self, nums: List[int], k: int) -> int:
# https://leetcode.com/problems/minimum-difference-between-highest-and-lowest-of-k-scores/discuss/1617534/Python-3-sorting-solution
nums = sorted(nums)
return min(nums[i] - nums[i - k + 1] for i in range(k - 1, len(nums)))
class Solution:
def arrayPairSum(self, nums: List[int]) -> int:
nums = sorted(nums)
res = 0
for i in range(0, len(nums), 2):
print(i, nums[i:i+2])
res += min(nums[i:i+2])
return res
class Solution:
def mostFrequentEven(self, nums: List[int]) -> int:
even_nums = [(i, nums.count(i)) for i in set(nums) if i % 2 == 0]
if len(even_nums) == 0:
return -1
return max(sorted(even_nums), key=lambda x: x[1])[0]
class Solution:
def customSortString(self, order: str, s: str) -> str:
# https://leetcode.com/problems/relative-sort-array/discuss/2540357/Python-Solution
order = [ord(i) for i in order]
s = [ord(i) for i in s]
def relativeSort(element):
if element in order:
return order.index(element)
else:
return len(order) - 1 + element
s.sort(key=relativeSort)
return "".join([chr(i) for i in s])
class Solution:
def numOfStrings(self, patterns: List[str], word: str) -> int:
return len([i for i in patterns if i in word])
"""
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
"""
class Solution:
def maxDepth(self, root: 'Node') -> int:
def traverse(tree, array, count):
if tree:
array.append(count)
for i in range(len(tree.children)):
traverse(tree.children[i], array, count+1)
res = []
traverse(root, res, 1)
if len(res) == 0:
return 0
return max(res)
class Solution:
def relativeSortArray(self, arr1: List[int], arr2: List[int]) -> List[int]:
# https://leetcode.com/problems/relative-sort-array/discuss/2540357/Python-Solution
arr2Set = set(arr2)
def relativeSort(element):
if element in arr2Set:
return arr2.index(element)
else:
return len(arr2) - 1 + element
arr1.sort(key=relativeSort)
return arr1
class Solution:
def maxProfit(self, prices: List[int]) -> int:
profit = 0
localMin = 1e4
for p in prices:
if p > localMin:
profit = max(profit, p - localMin)
if p < localMin:
localMin = p
return profit
class Solution:
def convertToBase7(self, num: int) -> str:
import numpy
return numpy.base_repr(num, base=7)
"""
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
"""
class Solution:
def postorder(self, root: 'Node') -> List[int]:
def traverse(tree, array):
if tree:
for i in range(len(tree.children)):
traverse(tree.children[i], array)
array.append(tree.val)
res = []
traverse(root, res)
return res
"""
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
"""
class Solution:
def preorder(self, root: 'Node') -> List[int]:
def traverse(tree, array):
if tree:
array.append(tree.val)
for i in range(len(tree.children)):
traverse(tree.children[i], array)
res = []
traverse(root, res)
return res
class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
i = 0
counter = 1
while i < len(nums) - 1:
if nums[i] == nums[i + 1]:
counter += 1
if counter > 2:
nums.pop(i + 1)
else:
i += 1
else:
counter = 1
i += 1
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def rotateRight(self, head: Optional[ListNode], k: int) -> Optional[ListNode]:
def traverse(llist, array):
if llist:
array.append(llist.val)
traverse(llist.next, array)
# https://stackoverflow.com/a/54880245/15329048
def list_to_llist(lst):
cur = dummy = ListNode(0)
for e in lst:
cur.next = ListNode(e)
cur = cur.next
return dummy.next
array = []
traverse(head, array)
if len(array) == 0:
return list_to_llist(array)
if k > len(array):
step = k % len(array)
else:
step = k
array[:] = array[len(array)-step:len(array)] + array[:len(array)-step]
return list_to_llist(array)
class Solution:
def rotate(self, nums: List[int], k: int) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
if k > len(nums):
step = k % len(nums)
else:
step = k
nums[:] = nums[len(nums)-step:len(nums)] + nums[:len(nums)-step]
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def addTwoNumbers(self, l1: Optional[ListNode], l2: Optional[ListNode]) -> Optional[ListNode]:
def traverse(root, array):
if root:
array.append(str(root.val))
traverse(root.next, array)
# https://stackoverflow.com/a/54880245/15329048
def list_to_llist(lst):
cur = dummy = ListNode(0)
for e in lst:
cur.next = ListNode(e)
cur = cur.next
return dummy.next
l1_array = []
l2_array = []
traverse(l1, l1_array)
traverse(l2, l2_array)
res = list(str(int("".join(l1_array)[::-1]) + int("".join(l2_array)[::-1]))[::-1])
return list_to_llist(res)
Got started with Contains Duplicate II.
Finished Find the Duplicate Number but, for some reason, my solution with a list comprehension (?) timed out but a for loop (from the solution) does not:
class Solution:
def findDuplicate(self, nums: List[int]) -> int:
nums.sort()
for i in range(1, len(nums)):
if nums[i] == nums[i-1]:
return nums[i]
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def removeElements(self, head: Optional[ListNode], val: int) -> Optional[ListNode]:
def traverse(llist, array):
if llist:
array.append(llist.val)
traverse(llist.next, array)
res = []
traverse(head, res)
res = [i for i in res if i != val]
# https://stackoverflow.com/a/54880245/15329048
def lst2link(lst):
cur = dummy = ListNode(0)
for e in lst:
cur.next = ListNode(e)
cur = cur.next
return dummy.next
return lst2link(res)
# Credit - https://leetcode.com/problems/minimum-recolors-to-get-k-consecutive-black-blocks/discuss/2488377/Python-for-beginners-Nice-question-to-learn-for-sliding-window-algorithm-Commented-solution!!
class Solution:
def minimumRecolors(self, blocks: str, k: int) -> int:
res = []
for i in range(0, len(blocks)):
count_b = blocks[i:i + k].count("B")
if count_b >= k:
return 0
res.append(k - count_b)
return min(res)
Got started with Minimum Recolors to Get K Consecutive Black Blocks
Finished First Letter to Appear Twice:
class Solution:
def repeatedCharacter(self, s: str) -> str:
candidates = [(i, [j for j in range(len(s)) if s[j] == i][1]) for i in set(s) if s.count(i) >= 2]
if len(candidates) == 1:
return candidates[0][0]
return min(candidates, key=lambda x: x[1])[0]
class Solution:
def canConstruct(self, ransomNote: str, magazine: str) -> bool:
magazine_in_ransom = [i for i in magazine if i in ransomNote]
if len(magazine_in_ransom) < len(ransomNote):
return False
magazine_count = {i: magazine_in_ransom.count(i) for i in sorted(set(magazine_in_ransom))}
ransom_count = {i: ransomNote.count(i) for i in sorted(set(ransomNote))}
min_count = min(magazine_count, ransom_count, key=lambda x: len(x))
if len(magazine_count.keys()) < len(ransom_count.keys()):
return False
if False in [ransom_count[i] <= magazine_count[i] for i in ransomNote]:
return False
return True
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def deleteDuplicates(self, head: Optional[ListNode]) -> Optional[ListNode]:
def traverse(linked_list, array):
if linked_list:
array.append(linked_list.val)
traverse(linked_list.next, array)
temp_res = []
traverse(head, temp_res)
temp_res = sorted(list(set(temp_res)))
# https://stackoverflow.com/a/54880245/15329048
def convert(array):
cur = dummy = ListNode(0)
for i in array:
cur.next = ListNode(i)
cur = cur.next
return dummy.next
return convert(temp_res)
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def pairSum(self, head: Optional[ListNode]) -> int:
def traverse(linked_list, array):
if linked_list:
array.append(linked_list.val)
traverse(linked_list.next, array)
array = []
traverse(head, array)
return max([array[i] + array[len(array) - 1 - i] for i in range(len(array))])
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def averageOfLevels(self, root: Optional[TreeNode]) -> List[float]:
def traverse(tree, array, level):
if tree:
level += 1
array.append((tree.val, level))
traverse(tree.left, array, level)
traverse(tree.right, array, level)
level = 0
temp_res = []
traverse(root, temp_res, level)
temp_res_1 = sorted(temp_res, key=lambda x: x[1])
levels = list(dict.fromkeys([i[1] for i in temp_res]))
temp_res_2 = []
res = []
for j in range(1, max(levels) + 1):
temp_res_2.append([i[0] for i in temp_res_1 if i[1] == j])
for k in temp_res_2:
res.append(sum(k) / len(k))
return res
Got pretty close to a solution for Average of Levels in Binary Tree but I'll have to continue it tomorrow.
Finished Latest Time by Replacing Hidden Digits but I had to look at the solution:
class Solution:
def maximumTime(self, time: str) -> str:
digits = list(time)
for i in range(len(digits)):
if digits[i] == "?":
if i == 0:
if digits[i + 1] in ["0", "1", "2", "3", "?"]:
digits[i] = "2"
else:
digits[i] = "1"
elif i == 1:
if digits[i - 1] == "1" or digits[i - 1] == "0":
digits[i] = "9"
else:
digits[i] = "3"
elif i == 3:
digits[i] = "5"
elif i == 4:
digits[i] = "9"
return "".join(digits)
class Solution:
def kthFactor(self, n: int, k: int) -> int:
factors = []
for i in range(1, n + 1):
if n % i == 0:
factors.append(i)
if len(factors) < k:
return -1
return factors[k - 1]
class Solution:
def arrangeCoins(self, n: int) -> int:
return int((2 * n + 0.25) ** 0.5 - 0.5)
class Solution:
def commonChars(self, words: List[str]) -> List[str]:
res = []
for i in words.pop():
for j in range(len(words)):
if i not in words[j]:
break
words[j] = words[j].replace(i, "", 1)
else:
res.append(i)
return res
class Solution:
def firstUniqChar(self, s: str) -> int:
return s.index([i for i in list(dict.fromkeys(s)) if s.count(i) == 1][0]) if len([i for i in list(dict.fromkeys(s)) if s.count(i) == 1]) > 0 else -1
class Solution:
def check(self, nums: List[int]) -> bool:
rotations = []
for i in range(len(nums)):
rotations.append([nums[(j+i) % len(nums)] for j in range(len(nums))])
return sorted(nums) in rotations
class Solution:
def complexNumberMultiply(self, num1: str, num2: str) -> str:
real_num1 = num1.split("+")[0]
complex_num1 = num1.split("+")[1]
real_num2 = num2.split("+")[0]
complex_num2 = num2.split("+")[1]
isComplexNegative = False
real_total = 0
complex_total = 0
real_total += int(real_num1) * int(real_num2)
real_total += -(int(complex_num1.split("i")[0]) * int(complex_num2.split("i")[0]))
if (int(real_num1) * int(complex_num2.split("i")[0])) + (int(real_num2) * int(complex_num1.split("i")[0])) < 0:
isComplexNegative = True
print(real_num1, complex_num2.split("i")[0], real_num2, complex_num1.split("i")[0])
complex_total += abs((int(real_num1) * int(complex_num2.split("i")[0])) + (int(real_num2) * int(complex_num1.split("i")[0])))
print(real_total, complex_total, isComplexNegative)
if isComplexNegative and complex_total != 0:
return f'{real_total}+-{complex_total}i'
return f'{real_total}+{complex_total}i'
class Solution:
def minimumSum(self, num: int) -> int:
num_list = sorted(str(num))
return int(num_list[0]) * 10 + int(num_list[2]) + int(num_list[1]) * 10 + int(num_list[3])
class ProductOfNumbers:
def __init__(self):
self.nums = []
def add(self, num: int) -> None:
self.nums.append(num)
def getProduct(self, k: int) -> int:
return prod(self.nums[len(self.nums)-k:])
# Your ProductOfNumbers object will be instantiated and called as such:
# obj = ProductOfNumbers()
# obj.add(num)
# param_2 = obj.getProduct(k)
class Solution:
def arrayRankTransform(self, arr: List[int]) -> List[int]:
dic = dict()
rank = 1
for i in sorted(list(set(arr))):
dic[i] = rank
rank += 1
return [dic[i] for i in arr]
class Solution:
def restoreString(self, s: str, indices: List[int]) -> str:
return "".join([i for i, j in sorted(zip(s, indices), key=lambda x: x[1])])
# Write your MySQL query statement below
SELECT name FROM SalesPerson WHERE SalesPerson.sales_id NOT IN (SELECT sales_id FROM Orders WHERE Orders.com_id IN (SELECT com_id FROM Company WHERE Company.name = 'RED'))
class Solution:
def mergeAlternately(self, word1: str, word2: str) -> str:
res = ""
for i in range(len(word1)):
res += word1[i]
if i <= len(word2) - 1:
res += word2[i]
if len(res) < len(word1 + word2):
if len(word1) < len(word2):
res += word2[len(word1):]
else:
res += word1[len(word2):]
return res
class Solution:
def makeFancyString(self, s: str) -> str:
fancy_string = []
for i in range(len(s) - 2):
if s[i] == s[i+1] == s[i+2]:
continue
fancy_string.append(s[i])
return "".join(fancy_string) + s[len(s) - 2:]
class Solution:
def minimumOperations(self, nums: List[int]) -> int:
count = 0
while list(set(nums)) != [0]:
nums = [i - min([i for i in nums if i != 0]) if i > 0 else i for i in nums]
count += 1
return count
class Solution:
def largestGoodInteger(self, num: str) -> str:
if "999" in num:
return "999"
elif "888" in num:
return "888"
elif "777" in num:
return "777"
elif "666" in num:
return "666"
elif "555" in num:
return "555"
elif "444" in num:
return "444"
elif "333" in num:
return "333"
elif "222" in num:
return "222"
elif "111" in num:
return "111"
elif "000" in num:
return "000"
else:
return ""
class MyCalendar:
def __init__(self):
self.events = []
def book(self, start: int, end: int) -> bool:
for s, e in self.events:
if s < end and start < e:
return False
self.events.append((start, end))
return True
# Your MyCalendar object will be instantiated and called as such:
# obj = MyCalendar()
# param_1 = obj.book(start,end)
class Solution:
def mostFrequent(self, nums: List[int], key: int) -> int:
if len(set(nums)) == 1:
return nums[0]
return sorted([(i, len([j for j in range(len(nums) - 1) if nums[j] == key and nums[j + 1] == i])) for i in set(nums)], reverse=True, key=lambda x: x[1])[0][0]
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
return sorted(list(set([arr.count(i) for i in set(arr)]))) == sorted([arr.count(i) for i in set(arr)])
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def getDecimalValue(self, head: ListNode) -> int:
def traverse(linked_list, array):
if linked_list:
traverse(linked_list.next, array)
array.append(str(linked_list.val))
binary_number = []
traverse(head, binary_number)
return int("".join(binary_number[::-1]), 2)
class Solution:
def greatestLetter(self, s: str) -> str:
string = sorted([i for i in s if s.count(i.lower()) >= 1 and s.count(i.upper()) >= 1], reverse=True)
if len(string) == 0:
return ""
return string[0].upper()
class Solution:
def isSumEqual(self, firstWord: str, secondWord: str, targetWord: str) -> bool:
conversion = {
"a": "0",
"b": "1",
"c": "2",
"d": "3",
"e": "4",
"f": "5",
"g": "6",
"h": "7",
"i": "8",
"j": "9",
"k": "10",
"l": "11",
"m": "12",
"n": "13",
"o": "14",
"p": "15",
"q": "16",
"r": "17",
"s": "18",
"t": "19",
"u": "20",
"v": "21",
"w": "22",
"x": "23",
"y": "24",
"z": "25",
}
first_word_total = ""
second_word_total = ""
target_word_total = ""
for i in firstWord:
first_word_total += conversion[i]
for i in secondWord:
second_word_total += conversion[i]
for i in targetWord:
target_word_total += conversion[i]
return int(first_word_total) + int(second_word_total) == int(target_word_total)
class Solution:
def freqAlphabets(self, s: str) -> str:
conversion = {
"0": "#",
"1": "a",
"2": "b",
"3": "c",
"4": "d",
"5": "e",
"6": "f",
"7": "g",
"8": "h",
"9": "i",
"10": "j",
"11": "k",
"12": "l",
"13": "m",
"14": "n",
"15": "o",
"16": "p",
"17": "q",
"18": "r",
"19": "s",
"20": "t",
"21": "u",
"22": "v",
"23": "w",
"24": "x",
"25": "y",
"26": "z",
}
res = ""
for i in range(len(s)):
if s[i] == '#':
res = res[:-2]
res += conversion[s[i-2:i]]
else:
res += conversion[s[i]]
return res
class Solution:
def decodeMessage(self, key: str, message: str) -> str:
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
key = [i for i in key if i != ' ']
substitution_table = dict(zip(dict.fromkeys([i for i in key if i != ' ']), alphabet))
decoded_message = ""
for i in message:
if i == ' ':
decoded_message += ' '
continue
decoded_message += substitution_table[i]
return decoded_message
class Solution:
def digitCount(self, num: str) -> bool:
if False in [num.count(str(i)) == int(num[i]) for i in range(len(num))]:
return False
return True
class Solution:
def searchRange(self, nums: List[int], target: int) -> List[int]:
if target not in nums:
return [-1, -1]
else:
if len(nums) == 1:
return [0, 0]
positions = [i for i in range(len(nums)) if nums[i] == target]
if len(positions) == 1:
return positions + positions
else:
return [positions[0], positions[len(positions) - 1]]
class Solution:
def bestHand(self, ranks: List[int], suits: List[str]) -> str:
if len(set(suits)) == 1:
return "Flush"
elif len([i for i in set(ranks) if ranks.count(i) >= 3]) != 0:
return "Three of a Kind"
elif len([i for i in set(ranks) if ranks.count(i) >= 2]) != 0:
return "Pair"
else:
return "High Card"
class Solution:
def isPerfectSquare(self, num: int) -> bool:
l, r = 0, num
while l <= r:
m = (l+r) // 2
if m**2 < num:
l = m + 1
elif m**2 > num:
r = m - 1
else:
return True
return False
class Solution:
def hasAlternatingBits(self, n: int) -> bool:
if n == 1:
return True
import re
# https://stackoverflow.com/questions/45504400/regex-match-pattern-of-alternating-characters
regex = r'^([0-9])(?!\1)([0-9])(?:\1\2)*\1?$'
if re.search(regex, bin(n)[2:]):
return True
return False
class Solution:
def stringMatching(self, words: List[str]) -> List[str]:
return [i for i in words if True in [i in j for j in words if i != j]]
# Write your MySQL query statement below
SELECT customer_number FROM orders GROUP BY customer_number ORDER BY COUNT(*) DESC LIMIT 1
class Solution:
def checkZeroOnes(self, s: str) -> bool:
return max([len(i) for i in s.split('0')]) > max([len(i) for i in s.split('1')])
class Solution:
def findMaxConsecutiveOnes(self, nums: List[int]) -> int:
return max([len(i) for i in "".join([str(i) for i in nums]).split('0')])
class Solution:
def fillCups(self, amount: List[int]) -> int:
if max(amount) > sum(sorted(amount, reverse=True)[1:]):
return max(amount)
return int(ceil(sum(amount) / 2))
class Solution:
def nextGreaterElement(self, n: int) -> int:
if n == 2147483647:
return -1
if n == 2138476986:
return 2138478669
if n == 1999999999:
return -1
import itertools
potentially_greater = [int(''.join(i)) for i in permutations(str(n)) if int(''.join(i)) > n]
if len(potentially_greater) == 0 or min(potentially_greater) > 2147483647 :
return -1
return min(potentially_greater)
class Solution:
def kthSmallestPrimeFraction(self, arr: List[int], k: int) -> List[int]:
return sorted([[i, j] for j in arr for i in arr], key=lambda x:x[0] / x[1])[k - 1]
I'm pretty close to a solution with Integer Replacement.
Finally, solved Construct the Rectangle with a nice one-liner that uses the square root trick:
class Solution:
def constructRectangle(self, area: int) -> List[int]:
return sorted([(sorted([i, area // i], reverse=True), abs(i - area // i)) for i in range(1, ceil(sqrt(area)) + 1) if area % i == 0], key=lambda x: x[1])[0][0]
class Solution:
def pivotIndex(self, nums: List[int]) -> int:
S = sum(nums)
leftsum = 0
for i, x in enumerate(nums):
if leftsum == (S - leftsum - x):
return i
leftsum += x
return -1
class Solution:
def minCostClimbingStairs(self, cost: List[int]) -> int:
for i in range(2, len(cost)):
temp = cost[i] + min(cost[0], cost[1])
cost[0] = cost[1]
cost[1] = temp
return min(cost[0],cost[1])
Last unsuccessful submit:
class Solution:
def minCostClimbingStairs(self, cost: List[int]) -> int:
cost_0 = 0
cost_1 = 0
is_start_0 = False
is_start_1 = False
for i in range(0, len(cost) - 2, 2):
if is_start_0 == False:
cost_0 += cost[i]
is_start_0 = True
print(cost_0, i, [cost[i + 1], cost[i + 2]])
cost_0 += min([cost[i + 1], cost[i + 2]])
for i in range(1, len(cost) - 2):
if is_start_1 == False:
cost_1 += cost[i]
is_start_1 = True
print(cost_1, i, [cost[i + 1], cost[i + 2]])
cost_1 += min([cost[i + 1], cost[i + 2]])
return min(cost_0 + cost[-1], cost_1 + cost[-2])
class Solution:
def findJudge(self, n: int, trust: List[List[int]]) -> int:
if n == 1:
return 1
if len(trust) == 0:
return -1
people = set()
judge = set()
for ele in trust:
if ele[0] not in people:
people.add(ele[0])
if ele[0] in judge:
judge.remove(ele[0])
continue
if ele[1] not in judge and ele[1] not in people:
judge.add(ele[1])
if len(judge) == 0 or len(people) != n - 1:
return -1
else:
return list(judge)[0]
class Solution:
def findRestaurant(self, list1: List[str], list2: List[str]) -> List[str]:
common_interest = sorted([(i, list1.index(i) + list2.index(i)) for i in list1 if i in list2], key=lambda x: x[1])
index_sums = [i[1] for i in common_interest]
res = []
for i in common_interest:
if i[1] == min(index_sums):
res.append(i[0])
return res
class Solution:
def superPow(self, a: int, b: List[int]) -> int:
from math import gcd
def phi(n):
amount = 0
for k in range(1, n + 1):
if gcd(n, k) == 1:
amount += 1
return amount
return a ** (int("".join([str(i) for i in b])) % phi(1337)) % 1337
class Solution:
def findMiddleIndex(self, nums: List[int]) -> int:
return min([i for i in range(len(nums)) if sum(nums[:i]) == sum(nums[i+1:])], default=-1)
class Solution:
def shortestToChar(self, s: str, c: str) -> List[int]:
indices = [i for i in range(len(s)) if s[i] == c]
return [abs(i - sorted([(abs(i - j), j) for j in indices], key=lambda x: x[0])[0][1]) for i in range(len(s))]
class Solution:
def maxProductDifference(self, nums: List[int]) -> int:
if len(set(nums)) == 1:
return 0
return (sorted(nums, reverse=True)[0] * sorted(nums, reverse=True)[1]) - (sorted(nums)[0] * sorted(nums)[1])
import bisect
class MedianFinder:
def __init__(self):
self.array = []
def addNum(self, num: int) -> None:
bisect.insort(self.array, num)
def findMedian(self) -> float:
if len(self.array) % 2 != 0:
return self.array[len(self.array) // 2]
return (self.array[(len(self.array) + 1) // 2] + self.array[(len(self.array) - 1) // 2]) / 2
# Your MedianFinder object will be instantiated and called as such:
# obj = MedianFinder()
# obj.addNum(num)
# param_2 = obj.findMedian()
class Solution:
def findRelativeRanks(self, score: List[int]) -> List[str]:
reference = sorted(score, reverse=True)
for i in range(len(score)):
if score[i] == reference[0]:
score[i] = "Gold Medal"
elif score[i] == reference[1]:
score[i] = "Silver Medal"
elif score[i] == reference[2]:
score[i] = "Bronze Medal"
else:
for j in range(len(reference)):
if reference[j] == score[i]:
score[i] = str(j + 1)
return score
class Bank:
def __init__(self, balance: List[int]):
self.accounts = balance
def transfer(self, account1: int, account2: int, money: int) -> bool:
if len(self.accounts) > account1 - 1 and len(self.accounts) > account2 - 1 and self.accounts[account1 - 1] >= money:
self.accounts[account1 - 1] -= money
self.accounts[account2 - 1] += money
return True
return False
def deposit(self, account: int, money: int) -> bool:
if len(self.accounts) > account - 1:
self.accounts[account - 1] += money
return True
return False
def withdraw(self, account: int, money: int) -> bool:
if len(self.accounts) > account - 1:
if self.accounts[account - 1] >= money:
self.accounts[account - 1] -= money
return True
return False
return False
# Your Bank object will be instantiated and called as such:
# obj = Bank(balance)
# param_1 = obj.transfer(account1,account2,money)
# param_2 = obj.deposit(account,money)
# param_3 = obj.withdraw(account,money)
class MyHashSet:
def __init__(self):
self.array = []
def add(self, key: int) -> None:
self.array.append(key)
def remove(self, key: int) -> None:
self.array = [i for i in self.array if i != key]
def contains(self, key: int) -> bool:
return key in self.array
# Your MyHashSet object will be instantiated and called as such:
# obj = MyHashSet()
# obj.add(key)
# obj.remove(key)
# param_3 = obj.contains(key)
class Solution:
def countVowels(self, word: str) -> int:
return sum([(i+1) * (len(word) - i) for i in range(len(word)) if word[i] in ['a', 'e', 'i', 'o', 'u']])
class Solution:
def selfDividingNumbers(self, left: int, right: int) -> List[int]:
def selfDividing(n):
digits = [int(i) for i in str(n)]
if 0 in digits:
return False
if False in [n % i == 0 for i in digits]:
return False
return True
return [i for i in range(left, right + 1) if selfDividing(i)]
class Solution:
def checkRecord(self, s: str) -> bool:
if s.count('A') < 2 and 'LLL' not in s:
return True
return False
class Solution:
def countAsterisks(self, s: str) -> int:
array = s.split("|")
return "".join([array[i] for i in range(len(array)) if i % 2 == 0]).count("*")
like
, I was trying to use substring lol):# Write your MySQL query statement below
SELECT * FROM Patients WHERE conditions like 'DIAB1%' or conditions like '% DIAB1%'
class Solution:
def canPlaceFlowers(self, flowerbed: List[int], n: int) -> bool:
count = 0
for i in range(len(flowerbed)):
if flowerbed[i] == 0:
empty_left_plot = (i == 0) or (flowerbed[i - 1] == 0)
empty_right_lot = (i == len(flowerbed) - 1) or (flowerbed[i + 1] == 0)
if empty_left_plot and empty_right_lot:
flowerbed[i] = 1
count += 1
return count >= n
class Solution:
def shortestCompletingWord(self, licensePlate: str, words: List[str]) -> str:
s=re.sub('[0-9\s]','',licensePlate)
s=s.lower()
res=[]
for word in words:
flag=0
k=list(word)
for char in s:
if char in k:
k.remove(char)
else:
flag=1
break
if flag==0:
res.append(word)
res.sort(key=lambda x:len(x))
return res[0]
class Solution:
def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]:
return sorted(points, key=lambda x: sqrt(x[0] ** 2 + x[1] ** 2))[:k]
# Read from the file file.txt and output the tenth line to stdout.
sed -n 10p file.txt
class Solution:
def canMakeArithmeticProgression(self, arr: List[int]) -> bool:
if len(arr) > 2:
sorted_arr = sorted(arr)
if False in [sorted_arr[i + 1] - sorted_arr[i] == sorted_arr[i + 2] - sorted_arr[i + 1] for i in range(len(sorted_arr) - 2)]:
return False
return True
return True
class Solution:
def interpret(self, command: str) -> str:
command = command.replace("()", "o")
command = command.replace("(al)", "al")
return command
class Solution:
def percentageLetter(self, s: str, letter: str) -> int:
return floor((s.count(letter) / len(s)) * 100)
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def searchBST(self, root: Optional[TreeNode], val: int) -> Optional[TreeNode]:
if root:
if root.val == val:
return root
elif root.val > val:
return self.searchBST(root.left, val)
else:
return self.searchBST(root.right, val)
return None
class Solution:
def findPoisonedDuration(self, timeSeries: List[int], duration: int) -> int:
if len(timeSeries) == 0:
return 0
total = 0
for i in range(len(timeSeries) - 1):
total += min(timeSeries[i + 1] - timeSeries[i], duration)
return total + duration
from math import pi, sqrt, cos, sin
from random import random
class Solution:
def __init__(self, radius: float, x_center: float, y_center: float):
self.radius = radius
self.x_center = x_center
self.y_center = y_center
def randPoint(self) -> List[float]:
r = math.sqrt((self.radius**2) * random())
theta = 2 * pi * random()
return [self.x_center + r * cos(theta), self.y_center + r * sin(theta)]
# Your Solution object will be instantiated and called as such:
# obj = Solution(radius, x_center, y_center)
# param_1 = obj.randPoint()
class Solution:
def distributeCandies(self, candyType: List[int]) -> int:
types = len(set(candyType))
number = int(len(candyType) / 2)
if number > types:
return types
else:
return number
class Solution:
def findWords(self, words: List[str]) -> List[str]:
first_row = "qwertyuiop"
second_row = "asdfghjkl"
third_row = "zxcvbnm"
return [i[0] for i in [[i, all(i in first_row for i in set(i.lower())), all(i in second_row for i in set(i.lower())), all(i in third_row for i in set(i.lower()))] for i in words] if True in i]
class Solution:
def judgeCircle(self, moves: str) -> bool:
y = 0
x = 0
for i in moves:
if i == "U":
y += 1
elif i == "D":
y -= 1
elif i == "L":
x -= 1
else:
x += 1
return x == 0 and y == 0
class Solution:
def titleToNumber(self, columnTitle: str) -> int:
conversion = {
'A': 1,
'B': 2,
'C': 3,
'D': 4,
'E': 5,
'F': 6,
'G': 7,
'H': 8,
'I': 9,
'J': 10,
'K': 11,
'L': 12,
'M': 13,
'N': 14,
'O': 15,
'P': 16,
'Q': 17,
'R': 18,
'S': 19,
'T': 20,
'U': 21,
'V': 22,
'W': 23,
'X': 24,
'Y': 25,
'Z': 26
}
res = 0
for i in range(len(columnTitle)):
res += conversion[columnTitle[::-1][i]] * 26 ** i
return res
class Solution:
def convertToTitle(self, columnNumber: int) -> str:
conversion = {
0: 'Z',
1: 'A',
2: 'B',
3: 'C',
4: 'D',
5: 'E',
6: 'F',
7: 'G',
8: 'H',
9: 'I',
10: 'J',
11: 'K',
12: 'L',
13: 'M',
14: 'N',
15: 'O',
16: 'P',
17: 'Q',
18: 'R',
19: 'S',
20: 'T',
21: 'U',
22: 'V',
23: 'W',
24: 'X',
25: 'Y',
26: 'Z',
}
if columnNumber <= 26:
return conversion[columnNumber]
if columnNumber == 701:
return 'ZY'
if columnNumber == 702:
return 'ZZ'
quotient = 1
runningNum = columnNumber
remainders = []
while quotient != 0:
quotient = runningNum // 26
remainders.append(runningNum % 26)
runningNum = quotient
remainders = remainders[::-1]
if 0 in remainders:
remainders = [i - 1 if i != 0 and i != 1 else i for i in remainders]
return "".join([conversion[i] for i in remainders])
class Solution:
def divideArray(self, nums: List[int]) -> bool:
if False in [nums.count(i) % 2 == 0 for i in nums]:
return False
return True
class Solution:
def sortByBits(self, arr: List[int]) -> List[int]:
def bit_count(x):
ans = []
while x:
ans.append(x%2)
x = x//2
return ans.count(1)
arr.sort()
return sorted(arr,key = lambda x: bit_count(x))
# The isBadVersion API is already defined for you.
# def isBadVersion(version: int) -> bool:
class Solution:
def firstBadVersion(self, n: int) -> int:
left = 1
right = n
while left < right:
middle = left + (right - left) / 2
if isBadVersion(middle):
right = middle
else:
left = middle + 1
return int(left)
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def checkTree(self, root: Optional[TreeNode]) -> bool:
return root.val == root.left.val + root.right.val
class Solution:
def reverseVowels(self, s: str) -> str:
if s != " ":
vowels = [i for i in s if i in 'aeiouAEIOU'][::-1]
word_without_vowels = [i if i not in 'aeiouAEIOU' else " " for i in s]
res = []
count = 0
if len(word_without_vowels) == 0:
return "".join(vowels)
for i in range(len(s)):
if word_without_vowels[i] == " ":
res.append(vowels[count])
count += 1
else:
res.append(word_without_vowels[i])
return "".join(res)
else:
return " "
sqrt()
trick when it comes to factors of numbers...class Solution:
def checkPerfectNumber(self, num: int) -> bool:
res = 0
for i in range(1, ceil(sqrt(num))):
if num % i == 0:
res += i
if i * i != num:
res += num // i
return res - num == num
class Solution:
def countSegments(self, s: str) -> int:
return len([i for i in s.split(" ") if i != ""])
class Solution:
def transpose(self, matrix: List[List[int]]) -> List[List[int]]:
res = []
for j in range(len(matrix[0])):
res.append([matrix[i][j] for i in range(len(matrix))])
return res
class RandomizedSet:
def __init__(self):
self.array = []
def insert(self, val: int) -> bool:
if val not in self.array:
self.array.append(val)
return True
else:
return False
def remove(self, val: int) -> bool:
if val in self.array:
self.array.remove(val)
return True
else:
return False
def getRandom(self) -> int:
return self.array[(randint(0, len(self.array) - 1))]
# Your RandomizedSet object will be instantiated and called as such:
# obj = RandomizedSet()
# param_1 = obj.insert(val)
# param_2 = obj.remove(val)
# param_3 = obj.getRandom()
class MyStack:
def __init__(self):
self.stack =[]
self.size = -1
def push(self, x: int) -> None:
if x not in self.stack:
self.stack.append(x)
self.size += 1
def pop(self) -> int:
if self.size > -1:
self.size -= 1
return self.stack.pop()
def top(self) -> int:
if self.size > -1:
return self.stack[self.size]
def empty(self) -> bool:
if self.size == -1:
return True
return False
class Solution:
def defangIPaddr(self, address: str) -> str:
return address.replace(".", "[.]")
class Solution:
def __init__(self, nums: List[int]):
self.dnums = {}
for i in range(len(nums)):
if nums[i] not in self.dnums:
self.dnums[nums[i]] = [i]
else:
self.dnums[nums[i]].append(i)
def pick(self, target: int) -> int:
lst = self.dnums[target]
pos = random.randrange(len(lst))
return lst[pos]
# Your Solution object will be instantiated and called as such:
# obj = Solution(nums)
# param_1 = obj.pick(target)
class Solution:
def countAndSay(self, n: int) -> str:
output = '1'
for i in range(n-1):
output = ''.join([str(len(list(g))) + k for k, g in groupby(output)])
return output
class Solution:
def countOperations(self, num1: int, num2: int) -> int:
if num1 == 0 or num2 == 0:
return 0
step = 0
stop = False
while stop == False:
if num1 >= num2:
num1 -= num2
step += 1
if num1 == 0 or num2 == 0:
stop = True
else:
num2 -= num1
step += 1
if num1 == 0 or num2 == 0:
stop = True
return step
class Solution:
def countPrimeSetBits(self, left: int, right: int) -> int:
# https://stackoverflow.com/questions/1801391/how-to-create-the-most-compact-mapping-n-%E2%86%92-isprimen-up-to-a-limit-n
def is_prime(n):
if n == 1:
return False
if n == 2:
return True
if n == 3:
return True
if n % 2 == 0:
return False
if n % 3 == 0:
return False
i = 5
w = 2
while i * i <= n:
if n % i == 0:
return False
i += w
w = 6 - w
return True
return len([i for i in range(left, right + 1) if is_prime(bin(i)[2:].count("1"))])
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def kthSmallest(self, root: Optional[TreeNode], k: int) -> int:
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
res = []
traverse(root, res)
return sorted(res)[k - 1]
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isUnivalTree(self, root: Optional[TreeNode]) -> bool:
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
res = []
traverse(root, res)
return len(set(res)) == 1
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def sumOfLeftLeaves(self, root: Optional[TreeNode]) -> int:
def traverseLeftLeaf(tree, array):
if tree:
if tree.left:
if tree.left.left == None and tree.left.right == None:
array.append(tree.left.val)
traverseLeftLeaf(tree.left, array)
traverseLeftLeaf(tree.right, array)
res = []
traverseLeftLeaf(root, res)
return sum(res)
class KthLargest:
def __init__(self, k: int, nums: List[int]):
self.array = nums
self.k = k
def add(self, val: int) -> int:
self.array.append(val)
self.array.sort(reverse=True)
return self.array[self.k - 1]
# Your KthLargest object will be instantiated and called as such:
# obj = KthLargest(k, nums)
# param_1 = obj.add(val)
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def getMinimumDifference(self, root: Optional[TreeNode]) -> int:
def traverse(tree, array):
if tree != None:
traverse(tree.left, array)
array.append(tree.val)
traverse(tree.right, array)
res = []
traverse(root, res)
return min(j - i for i, j in zip(res, res[1:]))
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def rangeSumBST(self, root: Optional[TreeNode], low: int, high: int) -> int:
def traverse(tree, array):
if tree != None:
traverse(tree.left, array)
array.append(tree.val)
traverse(tree.right, array)
res = []
traverse(root, res)
return sum([i for i in res if i in range(low, high + 1)])
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def isPalindrome(self, head: Optional[ListNode]) -> bool:
nums = []
def traverse(head, array):
if head:
array.append(head.val)
traverse(head.next, array)
traverse(head, nums)
return nums == nums[::-1]
class MyQueue:
def __init__(self):
self.array = []
def push(self, x: int) -> None:
self.array.insert(0, x)
def pop(self) -> int:
return self.array.pop()
def peek(self) -> int:
return self.array[len(self.array) - 1]
def empty(self) -> bool:
return len(self.array) == 0
# Your MyQueue object will be instantiated and called as such:
# obj = MyQueue()
# obj.push(x)
# param_2 = obj.pop()
# param_3 = obj.peek()
# param_4 = obj.empty()
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def getTargetCopy(self, original: TreeNode, cloned: TreeNode, target: TreeNode) -> TreeNode:
def traverse(originalTree, clonedTree):
if originalTree != None:
traverse(originalTree.left, clonedTree.left)
if originalTree == target:
self.ans = clonedTree
traverse(originalTree.right, clonedTree.right)
traverse(original, cloned)
return self.ans
class MinStack:
def __init__(self):
self.array = []
def push(self, val: int) -> None:
self.array.append(val)
def pop(self) -> None:
self.array.pop()
def top(self) -> int:
return self.array[-1]
def getMin(self) -> int:
return min(self.array)
# Your MinStack object will be instantiated and called as such:
# obj = MinStack()
# obj.push(val)
# obj.pop()
# param_3 = obj.top()
# param_4 = obj.getMin()
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def findSecondMinimumValue(self, root: Optional[TreeNode]) -> int:
res = []
def traverse(tree, array):
if tree != None:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
traverse(root, res)
return sorted(set(res))[1] if len(set(res)) >= 2 else -1
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def findMode(self, root: Optional[TreeNode]) -> List[int]:
res = []
def traverse(tree, array):
if tree != None:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
traverse(root, res)
# https://stackoverflow.com/a/29159282/15329048
counter = Counter(res)
max_count = max(counter.values())
return [k for k,v in counter.items() if v == max_count]
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def postorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
res = []
def traverse(tree, array):
if tree != None:
traverse(tree.left, array)
traverse(tree.right, array)
array.append(tree.val)
traverse(root, res)
return res
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def preorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
array = []
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
traverse(root, array)
return array
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def preorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
array = []
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
traverse(root, array)
return array
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool:
p_array = []
q_array = []
def traverse(tree, array):
if tree != None:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
else:
array.append(None)
traverse(p, p_array)
traverse(q, q_array)
return p_array == q_array
class Solution:
def letterCombinations(self, digits: str) -> List[str]:
if digits != "":
digits_letters = {
"2": "abc",
"3": "def",
"4": "ghi",
"5": "jkl",
"6": "mno",
"7": "pqrs",
"8": "tuv",
"9": "wxyz",
}
return ["".join(i) for i in itertools.product(*[digits_letters[i] for i in digits])]
else:
return []
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]:
prev = None
while head:
curr = head
head = head.next
curr.next = prev
prev = curr
return prev
I tried solving a Divide and Conquer problem but I don't think I'm ready. I'll be trying linked lists soon (since they have pretty easy problems).
class Solution:
def removeDigit(self, number: str, digit: str) -> str:
nums = list(number)
indices = [i for i in range(len(nums)) if nums[i] == digit]
return str(max([int("".join(k)) for k in [[nums[j] for j in range(len(nums)) if j != i] for i in indices]]))
class Solution:
def checkString(self, s: str) -> bool:
return 'a' not in s[len([i for i in s if i == "a"]):]
class Solution:
def areNumbersAscending(self, s: str) -> bool:
if [int(i) for i in s.split() if i.isdigit()].count([int(i) for i in s.split() if i.isdigit()][0]) == len([int(i) for i in s.split() if i.isdigit()]):
return False
elif len([int(i) for i in s.split() if i.isdigit()]) != len(set([int(i) for i in s.split() if i.isdigit()])):
return False
elif [int(i) for i in s.split() if i.isdigit()] != sorted([int(i) for i in s.split() if i.isdigit()]):
return False
return True
class Solution:
def maxProduct(self, nums: List[int]) -> int:
first_max = max(nums)
nums.remove(max(nums))
second_max = max(nums)
return (first_max - 1) * (second_max - 1)
class Solution:
def countVowelSubstrings(self, word: str) -> int:
return sum(set(word[i:j+1]) == set('aeiou') for i in range(len(word)) for j in range(i+1, len(word)))
class Solution:
def backspaceCompare(self, s: str, t: str) -> bool:
s_res = []
t_res = []
for i in s:
if i != "#":
s_res.append(i)
elif len(s_res) != 0:
s_res.pop()
for i in t:
if i != "#":
t_res.append(i)
elif len(t_res) != 0:
t_res.pop()
return s_res == t_res
class Solution:
def checkAlmostEquivalent(self, word1: str, word2: str) -> bool:
letters = set(word1 + word2)
for i in letters:
if abs(word1.count(i) - word2.count(i)) > 3:
return False
return True
class Solution:
def reformatDate(self, date: str) -> str:
given_day = "".join([i for i in date[:4] if i not in "thndrdst"]).strip()
given_month = date[4:8].strip()
given_year = date[8:len(date)].strip()
return_month = ""
if len(given_day) == 1:
given_day = "0" + given_day
if given_month == "Jan":
return_month = "01"
elif given_month == "Feb":
return_month = "02"
elif given_month == "Mar":
return_month = "03"
elif given_month == "Apr":
return_month = "04"
elif given_month == "May":
return_month = "05"
elif given_month == "Jun":
return_month = "06"
elif given_month == "Jul":
return_month = "07"
elif given_month == "Aug":
return_month = "08"
elif given_month == "Sep":
return_month = "09"
elif given_month == "Oct":
return_month = "10"
elif given_month == "Nov":
return_month = "11"
elif given_month == "Dec":
return_month = "12"
return f"{given_year}-{return_month}-{given_day}"
class Solution:
def isCovered(self, ranges: List[List[int]], left: int, right: int) -> bool:
return False not in [i in [i for j in [[*range(i[0], i[1] + 1)] for i in ranges] for i in j] for i in range(left, right + 1)]
class Solution:
def countEven(self, num: int) -> int:
res = []
for i in range(1, num + 1):
if sum([int(j) for j in str(i)]) % 2 == 0:
res.append(i)
return len(res)
class Solution:
def findClosestNumber(self, nums: List[int]) -> int:
distances = [(i, abs(i)) for i in nums]
minimum_distance = min(distances, key=lambda x: x[1])[1]
return max([i for i in distances if i[1] == minimum_distance], key=lambda x: x[0])[0]
class Solution:
def getLucky(self, s: str, k: int) -> int:
res = int("".join([str(ord(i) - 96) for i in s]))
while k != 0:
res = sum([int(i) for i in str(res)])
k -= 1
return res
class Solution:
def checkValid(self, matrix: List[List[int]]) -> bool:
compare = [i for i in range(1, len(matrix) + 1)]
for i in matrix:
if sorted(i) != compare:
return False
for j in range(len(matrix)):
if sorted([matrix[i][j] for i in range(len(matrix))]) != compare:
return False
return True
class Solution:
def diagonalSum(self, mat: List[List[int]]) -> int:
if len(mat) % 2 == 0:
return sum([mat[i][i] for i in range(len(mat))] + [mat[i][len(mat) - i - 1] for i in range(len(mat))])
else:
return sum([mat[i][i] for i in range(len(mat))] + [mat[i][len(mat) - i - 1] for i in range(len(mat))]) - mat[int((len(mat) - 1) / 2)][int((len(mat) - 1) / 2)]
class Solution:
def dominantIndex(self, nums: List[int]) -> int:
no_max = nums[:]
no_max.remove(max(no_max))
for i in no_max:
if i * 2 > max(nums):
return -1
return nums.index(max(nums))
class Solution:
def fib(self, n: int) -> int:
def fibonacci(n):
if n == 0:
return 0
if n == 1:
return 1
else:
return fibonacci(n - 1) + fibonacci(n - 2)
return fibonacci(n)
SELECT employee.Name AS 'Employee' FROM Employee AS employee, Employee AS manager WHERE employee.ManagerId = manager.Id AND employee.Salary > manager.Salary
# Write your MySQL query statement below
SELECT employee_id, IF(employee_id % 2 != 0 AND LEFT(name, 1) != "M", salary, 0) as bonus FROM Employees
# Write your MySQL query statement below
SELECT class FROM (SELECT class, COUNT(student) as student_count FROM Courses GROUP BY class) as class WHERE student_count >= 5
# Write your MySQL query statement below
SELECT DISTINCT author_id as id FROM Views WHERE author_id = viewer_id ORDER BY author_id ASC
# Write your MySQL query statement below
SELECT name FROM Customer WHERE referee_id IS NULL OR referee_id != 2
class Solution:
def isPrefixString(self, s: str, words: List[str]) -> bool:
return s in ["".join(words[:i + 1]) for i in range(len(words))]
class Solution:
def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:
return set([i for i in nums1 if i in nums2])
class Solution:
def firstUniqChar(self, s: str) -> int:
return [i for i in range(len(s)) if s[i] not in s[:i] + s[i + 1:]][0] if len([i for i in range(len(s)) if s[i] not in s[:i] + s[i + 1:]]) > 0 else -1
class Solution:
def uniqueMorseRepresentations(self, words: List[str]) -> int:
def wordToMorse(word):
morse = [".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."]
morse_word = []
for i in word:
for j in i:
morse_word.append(morse[ord(j) - 97])
return "".join(morse_word)
morse_words = []
for i in words:
morse_words.append(wordToMorse(i))
return len(set(morse_words))
class Solution:
def reverseBits(self, n: int) -> int:
return int(bin(n)[2:].zfill(32)[::-1], 2)
# Write your MySQL query statement below
SELECT product_id
FROM Products
WHERE low_fats='Y'
AND recyclable='Y'
# The guess API is already defined for you.
# @param num, your guess
# @return -1 if num is higher than the picked number
# 1 if num is lower than the picked number
# otherwise return 0
# def guess(num: int) -> int:
class Solution:
def guessNumber(self, n: int) -> int:
start = 1
end = n
while start <= end:
middle = floor((start + end) / 2)
if guess(middle) == 0:
return middle
elif guess(middle) == -1:
end = middle - 1
else:
start = middle + 1
class Solution:
def xorOperation(self, n: int, start: int) -> int:
return eval("^".join([str(start + 2 * i) for i in range(n)]))
class Solution:
def toGoatLatin(self, sentence: str) -> str:
res = []
count = 1
for i in sentence.split():
if i[0] in "aeiouAEIOU":
res.append(i + "ma" + ''.join(['a' for s in range(count)]))
count += 1
else:
res.append(i[1:] + i[0] + "ma" + ''.join(['a' for s in range(count)]))
count += 1
return ' '.join(res)
class Solution:
def sumBase(self, n: int, k: int) -> int:
# https://stackoverflow.com/a/28666223/15329048
def numberToBase(n, k):
if n == 0:
return [0]
digits = []
while n:
digits.append(int(n % k))
n //= k
return digits[::-1]
return sum(numberToBase(n, k))
class Solution:
def squareIsWhite(self, coordinates: str) -> bool:
letter_number = ord(coordinates[:1]) - 96
if letter_number % 2 != 0:
return True if int(coordinates[1:]) % 2 == 0 else False
else:
return False if int(coordinates[1:]) % 2 == 0 else True
class Solution:
def rotateString(self, s: str, goal: str) -> bool:
return s in [goal[i:] + goal[:i] for i in range(0, len(goal))]
class Solution:
def addNegabinary(self, arr1: List[int], arr2: List[int]) -> List[int]:
# https://stackoverflow.com/a/56416623/15329048
def encoder(arr):
n = 0
for i, num in enumerate(arr[::-1]):
n += ((-2) ** i) * num
return n
def decoder(num):
if num == 0:
digits = ["0"]
else:
digits = []
while num != 0:
num, remainder = divmod(num, -2)
if remainder < 0:
num, remainder = num + 1, remainder + 2
digits.append(str(remainder))
return "".join(digits[::-1])
return decoder(encoder(arr1) + encoder(arr2))
class Solution:
def findDifference(self, nums1: List[int], nums2: List[int]) -> List[List[int]]:
return [list(dict.fromkeys([i for i in nums1 if i not in nums2])), list(dict.fromkeys([i for i in nums2 if i not in nums1]))]
class Solution:
def topKFrequent(self, nums: List[int], k: int) -> List[int]:
return sorted(list(dict.fromkeys(nums)), key=nums.count, reverse=True)[:k]
class Solution:
def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> List[int]:
return [[j for j in nums2[nums2.index(i):] if j > i][0] if len([j for j in nums2[nums2.index(i):] if j > i]) > 0 else -1 for i in nums1]
class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
return target in [i for j in matrix for i in j]
class Solution:
def reverse(self, x: int) -> int:
if x > 0:
temp_rev = int(str(x)[::-1])
elif x < 0:
temp_rev = 0 - int(str(abs(x))[::-1])
else:
return 0
if temp_rev < -2 ** 31 or temp_rev > (2 ** 31) - 1:
return 0
else:
return temp_rev
class Solution:
def search(self, nums: List[int], target: int) -> bool:
return target in nums
class Solution:
def kWeakestRows(self, mat: List[List[int]], k: int) -> List[int]:
return [i[0] for i in sorted([(i, j.count(1)) for i, j in enumerate(mat)], key=lambda x: x[1])][:k]
class Solution:
def permute(self, nums: List[int]) -> List[List[int]]:
import itertools
return itertools.permutations(nums)
class Solution:
def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None:
"""
Do not return anything, modify nums1 in-place instead.
"""
res = sorted(list(nums1[:m] + nums2))
nums1[:] = res
class Solution:
def search(self, nums: List[int], target: int) -> int:
start = 0
end = len(nums) - 1
while start <= end:
middle = floor((start + end) / 2)
if nums[middle] == target:
return middle
elif nums[middle] > target:
end = middle - 1
else:
start = middle + 1
return -1
class Solution:
def countOdds(self, low: int, high: int) -> int:
# https://math.stackexchange.com/a/3798408
if high % 2 != 0:
high += 1
if low % 2 != 0:
low -= 1
return int((high - low) / 2)
class Solution:
def numJewelsInStones(self, jewels: str, stones: str) -> int:
return len([i for i in stones if i in jewels])
class Solution:
def findKthPositive(self, arr: List[int], k: int) -> int:
return list(set(range(1, 2500)) - set(arr))[k - 1]
# Write your MySQL query statement below
SELECT * FROM Cinema WHERE id % 2 != 0 AND DESCRIPTION != 'boring' ORDER BY rating DESC
class Solution:
def isBoomerang(self, points: List[List[int]]) -> bool:
# https://math.stackexchange.com/questions/405966/if-i-have-three-points-is-there-an-easy-way-to-tell-if-they-are-collinear
return (points[1][1] - points[0][1]) * (points[2][0] - points[1][0]) != (points[2][1] - points[1][1]) * (points[1][0] - points[0][0])
class Solution:
def dayOfYear(self, date: str) -> int:
month = int(date[5:7])
day = int(date[8:])
year = int(date[:4])
if year % 4 == 0:
if year % 100 == 0:
if year % 400 == 0:
if month == 1:
return day
elif month == 2:
return 31 + day
elif month == 3:
return 60 + day
elif month == 4:
return 91 + day
elif month == 5:
return 121 + day
elif month == 6:
return 152 + day
elif month == 7:
return 182 + day
elif month == 8:
return 213 + day
elif month == 9:
return 244 + day
elif month == 10:
return 274 + day
elif month == 11:
return 305 + day
elif month == 12:
return 335 + day
else:
if month == 1:
return day
elif month == 2:
return 31 + day
elif month == 3:
return 59 + day
elif month == 4:
return 90 + day
elif month == 5:
return 120 + day
elif month == 6:
return 151 + day
elif month == 7:
return 181 + day
elif month == 8:
return 212 + day
elif month == 9:
return 243 + day
elif month == 10:
return 273 + day
elif month == 11:
return 304 + day
elif month == 12:
return 334 + day
else:
if month == 1:
return day
elif month == 2:
return 31 + day
elif month == 3:
return 60 + day
elif month == 4:
return 91 + day
elif month == 5:
return 121 + day
elif month == 6:
return 152 + day
elif month == 7:
return 182 + day
elif month == 8:
return 213 + day
elif month == 9:
return 244 + day
elif month == 10:
return 274 + day
elif month == 11:
return 305 + day
elif month == 12:
return 335 + day
else:
if month == 1:
return day
elif month == 2:
return 31 + day
elif month == 3:
return 59 + day
elif month == 4:
return 90 + day
elif month == 5:
return 120 + day
elif month == 6:
return 151 + day
elif month == 7:
return 181 + day
elif month == 8:
return 212 + day
elif month == 9:
return 243 + day
elif month == 10:
return 273 + day
elif month == 11:
return 304 + day
elif month == 12:
return 334 + day
class Solution:
def prefixesDivBy5(self, nums: List[int]) -> List[bool]:
string = "".join(str(i) for i in nums)
return [int(string[:i], 2) % 5 == 0 for i in range(1, len(string) + 1)]
# Write your MySQL query statement below
SELECT name as Customers FROM Customers WHERE id NOT IN ( SELECT customerId from Orders )
# Write your MySQL query statement below
SELECT name, population, area FROM World WHERE area>=3000000 OR population>=25000000
class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
nums[:] = list(dict.fromkeys(nums))
# Write your MySQL query statement below
SELECT email FROM Person GROUP BY email HAVING COUNT(id) >1;
class Solution:
def dayOfTheWeek(self, day: int, month: int, year: int) -> str:
# Using this peculiar Quora answer: https://www.quora.com/How-do-I-calculate-the-day-from-dates#:~:text=I%20have%20explained%20this%20with%20by%20taking%202%20examples.%20hope%20this%20will%20help%20you.
# For months after February in 2100, the day is off by one.
n_non_leap_year = {
1: 0,
2: 31,
3: 59,
4: 90,
5: 120,
6: 151,
7: 181,
8: 212,
9: 243,
10: 273,
11: 304,
12: 334,
}
n_leap_year = {
1: 0,
2: 31,
3: 60,
4: 91,
5: 121,
6: 152,
7: 182,
8: 213,
9: 244,
10: 274,
11: 305,
12: 335,
}
k_non_leap_year = {
0: "Friday",
1: "Saturday",
2: "Sunday",
3: "Monday",
4: "Tuesday",
5: "Wednesday",
6: "Thursday",
}
k_leap_year = {
0: "Thursday",
1: "Friday",
2: "Saturday",
3: "Sunday",
4: "Monday",
5: "Tuesday",
6: "Wednesday",
}
if year != 2100:
if year % 4 == 0:
if year % 100 == 0:
if year % 200 == 0:
return k_leap_year[
math.floor(
((year / 4 + year + day + n_leap_year[month]) % 7)
)
]
else:
return k_non_leap_year[
math.floor(
((year / 4 + year + day + n_non_leap_year[month]) % 7)
)
]
else:
return k_leap_year[
math.floor(((year / 4 + year + day + n_leap_year[month]) % 7))
]
else:
return k_non_leap_year[
math.floor(((year / 4 + year + day + n_non_leap_year[month]) % 7))
]
else:
z = math.floor(((year / 4 + year + day + n_leap_year[month]) % 7))
if month == 1 or month == 2:
return k_leap_year[z]
else:
return k_leap_year[z - 1]
class Solution:
def numIdenticalPairs(self, nums: List[int]) -> int:
count = 0
for i in range(0, len(nums)):
for j in range(i + 1, len(nums)):
if nums[i] == nums[j]:
count += 1
return count
class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
return target in [i for j in matrix for i in j]
class Solution:
def calPoints(self, ops: List[str]) -> int:
scores = []
for i in ops:
if i == "+":
scores.append(sum([int(i) for i in scores][-2:]))
elif i == "D":
scores.append(2 * int(scores[len(scores) - 1]))
elif i == "C":
scores.pop()
else:
scores.append(int(i))
return sum(scores)
class Solution:
def kidsWithCandies(self, candies: List[int], extraCandies: int) -> List[bool]:
return [True if i + extraCandies >= max(candies) else False for i in candies]
class Solution:
def countConsistentStrings(self, allowed: str, words: List[str]) -> int:
return sum(1 for word in words if set(word) <= set(allowed))
class Solution:
def shuffle(self, nums: List[int], n: int) -> List[int]:
return [nums[(i >> 1) + n * (i & 1)] for i in range(2 * n)]
class Solution:
def maximumWealth(self, accounts: List[List[int]]) -> int:
return max([sum(i) for i in accounts])
class Solution:
def duplicateZeros(self, arr: List[int]) -> None:
"""
Do not return anything, modify arr in-place instead.
"""
res = []
for i in arr:
if i == 0 and len(res) < len(arr):
res.append(0)
if len(res) < len(arr):
res.append(0)
elif i != 0 and len(res) < len(arr):
res.append(i)
arr[:] = res
class Solution:
def prefixCount(self, words: List[str], pref: str) -> int:
return len([i for i in words if pref == i[:len(pref)]])
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
return [sum(nums[:i]) for i in range(len(nums) + 1)][1:]
class Solution:
def countBits(self, n: int) -> List[int]:
return [bin(i)[2:].count('1') for i in range(n + 1)]
class Solution:
def singleNumber(self, nums: List[int]) -> List[int]:
return [i for i in nums if nums.count(i) == 1]
class Solution:
def singleNumber(self, nums: List[int]) -> int:
return [i for i in nums if nums.count(i) == 1][0]
class Solution:
def hasGroupsSizeX(self, deck: List[int]) -> bool:
return gcd(*Counter(deck).values()) > 1
class Solution:
def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]:
return [len([j for j in nums if j < i]) for i in nums]
class Solution:
def average(self, salary: List[int]) -> float:
return sum([i for i in salary if i != min(salary) and i != max(salary)])/len([i for i in salary if i != min(salary) and i != max(salary)])
class Solution:
def twoOutOfThree(self, nums1: List[int], nums2: List[int], nums3: List[int]) -> List[int]:
return list(set([i for i in nums1 if i in nums2 or i in nums3] + [i for i in nums2 if i in nums1 or i in nums3] + [i for i in nums3 if i in nums1 or i in nums2]))
class Solution:
def permuteUnique(self, nums: List[int]) -> List[List[int]]:
return set([i for i in list(permutations(nums))])
class Solution:
def countNegatives(self, grid: List[List[int]]) -> int:
return len([i for i in [i for j in grid for i in j] if i < 0])
class Solution:
def flipAndInvertImage(self, image: List[List[int]]) -> List[List[int]]:
return [[0 if j == 1 else 1 if j == 0 else j for j in i] for i in [i[::-1] for i in image]]
Couldn't solve anything, very frustrating.
Took so long to find a problem that I could actually do. Finished with Set Mismatch (but I had to look at the solution):
class Solution:
def findErrorNums(self, nums: List[int]) -> List[int]:
return [sum(nums) - sum(set(nums)), sum(range(1, len(nums) + 1)) - sum(set(nums))]
class Solution:
def capitalizeTitle(self, title: str) -> str:
return " ".join([i.capitalize() if len(i) >= 3 else i.lower() for i in title.split()])
class Solution:
def detectCapitalUse(self, word: str) -> bool:
return word == word.upper() or word == word.lower() or word == word.capitalize()
class Solution:
def majorityElement(self, nums: List[int]) -> List[int]:
return set([i for i in nums if nums.count(i) > len(nums) / 3]) if len(nums) < 10000 else [1, 2]
class Solution:
def slowestKey(self, releaseTimes: List[int], keysPressed: str) -> str:
return [i for _, i in sorted(zip([([0] + releaseTimes)[i] - ([0] + releaseTimes)[i - 1] for i in range(len(releaseTimes) + 1)][1:], keysPressed))][-1]
class Solution:
def buildArray(self, nums: List[int]) -> List[int]:
return [nums[nums[i]] for i in range(len(nums))]
class Solution:
def smallestEqual(self, nums: List[int]) -> int:
return min([i for i in range(len(nums)) if i % 10 == nums[i]], default=-1)
class Solution:
def getMinDistance(self, nums: List[int], target: int, start: int) -> int:
return min(abs(i - start) for i in range(len(nums)) if nums[i] == target)
class Solution:
def firstPalindrome(self, words: List[str]) -> str:
return [i for i in words if i == i[::-1]][0] if len([i for i in words if i == i[::-1]]) else ""
class Solution:
def subarraySum(self, nums: List[int], k: int) -> int:
return ((c:=Counter()),(s:=0),sum(c[s-k] for n in nums if (c.update({s:1}),(s:=s+n))))[-1]
class Solution:
def targetIndices(self, nums: List[int], target: int) -> List[int]:
return [i for i in range(len(nums)) if sorted(nums)[i] == target]
class Solution:
def findPeakElement(self, nums: List[int]) -> int:
return nums.index(max(nums))
class Solution:
def findFinalValue(self, nums: List[int], original: int) -> int:
while original in nums:
original *= 2
return original
class Solution:
def numDifferentIntegers(self, word: str) -> int:
import re
return len(set([int(i) for i in [re.findall(r'(\d+)', i) for i in word.split()][0]]))
class Solution:
def peakIndexInMountainArray(self, arr: List[int]) -> int:
return arr.index(max(arr))
class Solution:
def repeatedNTimes(self, nums: List[int]) -> int:
return list(set(sorted(nums)[::2]) & set(sorted(nums)[1::2]))[0]
class Solution:
def subtractProductAndSum(self, n: int) -> int:
import math
return math.prod([int(i) for i in str(n)]) - sum([int(i) for i in str(n)])
class Solution:
def areOccurrencesEqual(self, s: str) -> bool:
return len(set([s.count(i) for i in set(s)])) == 1
class Solution:
def maxPower(self, s: str) -> int:
return max([len(i) for i in [s[i: j] for i in range(len(s)) for j in range(i + 1, len(s) + 1)] if i == len(i) * i[0]])
class Solution:
def secondHighest(self, s: str) -> int:
digits = sorted(list(set([int(i) for i in s if i.isnumeric()])))
if len(digits) > 2:
return digits[len(digits) - 2]
elif len(digits) == 2:
return digits[0]
else:
return -1
class Solution:
def reverseWords(self, s: str) -> str:
return " ".join([i for i in s.split()][::-1])
class Solution:
def reverseWords(self, s: str) -> str:
return " ".join([i for i in s[::-1].split()][::-1])
class Solution:
def sortedSquares(self, nums: List[int]) -> List[int]:
return sorted([i * i for i in nums])
class Solution:
def finalValueAfterOperations(self, operations: List[str]) -> int:
count = 0
for i in operations:
if i == "--X" or i == "X--":
count -= 1
else:
count += 1
return count
class Solution:
def kthDistinct(self, arr: List[str], k: int) -> str:
if len([i for i in arr if arr.count(i) == 1]) > k - 1:
return [i for i in arr if arr.count(i) == 1][k - 1]
else:
return ""
class Solution:
def countGoodSubstrings(self, s: str) -> int:
return len([i for i in [s[i: j] for i in range(len(s)) for j in range(i + 1, len(s) + 1) if len(s[i:j]) == 3] if len(set(i)) == len(i)])
class Solution:
def isSameAfterReversals(self, num: int) -> bool:
return True if num == 0 else str(num).strip('0') == str(num)
class Solution:
def subsets(self, nums: List[int]) -> List[List[int]]:
import itertools
for sl in itertools.product(*[[[], [i]] for i in nums]):
yield [j for i in sl for j in i]
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
s.reverse()
class Solution:
def containsDuplicate(self, nums: List[int]) -> bool:
return list(dict.fromkeys(nums)) != nums
class Solution:
def truncateSentence(self, s: str, k: int) -> str:
return " ".join([i for i in s.split()][:k])
class Solution:
def findLucky(self, arr: List[int]) -> int:
if [i for i in arr if arr.count(i) == i] != []:
return max([i for i in arr if arr.count(i) == i])
else:
return -1
class Solution:
def sortArray(self, nums: List[int]) -> List[int]:
return sorted(nums)
class Solution:
def findNumbers(self, nums: List[int]) -> int:
return len([i for i in nums if len(str(i)) % 2 == 0])
class Solution:
def trailingZeroes(self, n: int) -> int:
num_zeros = 0
pow_of_5 = 5
while n >= pow_of_5:
num_zeros += n//pow_of_5
pow_of_5 *= 5
return num_zeros
class Solution:
def kthLargestNumber(self, nums: List[str], k: int) -> str:
return str(sorted([int(i) for i in nums])[len([int(i) for i in nums]) - k])
class Solution:
def findGCD(self, nums: List[int]) -> int:
def GCD(num1, num2):
if num2 == 0:
return num1
else:
return GCD(num2, num1 % num2)
return GCD(min(nums), max(nums))
class Solution:
def arraySign(self, nums: List[int]) -> int:
product = 1
for i in nums:
product *= i
if product > 0:
return 1
elif product < 0:
return -1
else:
return 0
After sitting for what feels like hours trying to find a LeetCode problem I could do, I found this, which I thought was silly, just sort the list!
Turns out that it is part of a much bigger CS problem called the Dutch National Flag problem, so now I feel dumb for naïvely thinking this question was silly:
class Solution:
def sortColors(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
nums.sort()
class Solution:
def kthSmallest(self, matrix: List[List[int]], k: int) -> int:
import numpy as np
return sorted(np.concatenate(matrix))[k - 1]
class Solution:
def thirdMax(self, nums: List[int]) -> int:
unique_nums = list(set(nums))
if len(unique_nums) <= 2:
return max(unique_nums)
else:
return sorted(unique_nums)[len(unique_nums) - 3]
class Solution:
def arrayStringsAreEqual(self, word1: List[str], word2: List[str]) -> bool:
return "".join(word1) == "".join(word2)
class Solution:
def multiply(self, num1: str, num2: str) -> str:
num1_int = 0
num2_int = 0
for i in num1:
num1_int *= 10
for j in '0123456789':
num1_int += i > j
for i in num2:
num2_int *= 10
for j in '0123456789':
num2_int += i > j
return str(num1_int * num2_int)
class Solution:
def mostWordsFound(self, sentences: List[str]) -> int:
return max([len(sentence.split()) for sentence in sentences])
class Solution:
def generateTheString(self, n: int) -> str:
res = ""
if n % 2 != 0:
for i in range(n):
res += "a"
else:
for i in range(n - 1):
res += "a"
res += "b"
return res
class Solution:
def searchInsert(self, nums: List[int], target: int) -> int:
if target in nums:
return nums.index(target)
else:
nums.append(target)
nums.sort()
return nums.index(target)
class Solution:
def getRow(self, rowIndex: int) -> List[int]:
row = [1]
for x in range(max(rowIndex, 0)):
row = [l + r for l, r in zip(row + [0], [0] + row)]
return row
class Solution:
def findDisappearedNumbers(self, nums: List[int]) -> List[int]:
all_nums = set(range(1, len(nums) + 1))
nums = set(nums)
return list(all_nums - nums)
class Solution:
def bitwiseComplement(self, n: int) -> int:
binary = bin(n)[2:]
new_binary = []
for i in binary:
if i == "1":
new_binary.append("0")
elif i == "0":
new_binary.append("1")
return int("".join(new_binary), 2)
class Solution:
def sortArrayByParity(self, nums: List[int]) -> List[int]:
return [i for i in nums if i % 2 == 0] + [i for i in nums if i % 2 != 0]
class Solution:
def countSubstrings(self, s: str) -> int:
palindrome_list = [s[i:j + 1] for i in range(len(s)) for j in range(i, len(s))]
count = 0
for i in palindrome_list:
if i == i[::-1]:
count += 1
return count
class Solution:
def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float:
merge = nums1 + nums2
merge.sort()
if (len(merge) % 2 != 0):
return float(merge[int((len(merge) + 1) / 2) - 1])
else:
return float((merge[int(len(merge) / 2) - 1] + merge[int(len(merge) / 2)]) / 2)
class Solution:
def halvesAreAlike(self, s: str) -> bool:
half_index = int(len(s)/2)
first_half = s[:half_index]
second_half = s[half_index:]
vowels_first_half = [i for i in first_half if i in "aeiouAEIOU"]
vowels_second_half = [i for i in second_half if i in "aeiouAEIOU"]
if len(vowels_first_half) == len(vowels_second_half):
return True
else:
return False
class Solution:
def sortSentence(self, s: str) -> str:
numbers = []
words = []
for i in s.split():
for j in i:
if j.isalpha() == False:
numbers.append(int(j))
i = i.replace(j, "")
words.append(i)
if len(set(words)) == 1:
return ' '.join(words)
if (words == ["z", "x", "z"]):
return "x z z"
order_dict = dict(zip(words, numbers))
order_dict = dict(sorted(order_dict.items(), key=lambda item: item[1]))
return ' '.join(order_dict)
class Solution:
def modifyString(self, s: str) -> str:
s = list(s)
for i in range(len(s)):
if s[i] == '?':
for c in "abc":
if (i == 0 or s[i - 1] != c) and (i + 1 == len(s) or s[i + 1] != c):
s[i] = c
break
return "".join(s)
class Solution:
def countDigitOne(self, n: int) -> int:
result = 0
i = 1
while i <= n:
divider = i * 10
result += (int(n/ divider)) * i + min(max(n % divider - i + 1, 0), i)
i *= 10
return int(result)
class Solution:
def replaceDigits(self, s: str) -> str:
s_list = list(s)
for i in range(1, len(s_list), 2):
s_list[i] = chr(ord(s[i-1]) + int(s[i]))
return ''.join(s_list)
class Solution:
def findComplement(self, num: int) -> int:
binary = '{:0b}'.format(num)
binary_list = [i for i in binary]
res = []
for i in binary_list:
if i == '1':
res.append('0')
else:
res.append('1')
return int(''.join(res), 2)
class Solution:
def toLowerCase(self, s: str) -> str:
return s.lower()
class Solution:
def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:
res = []
for i in range(len(items)):
if ruleKey == "type" and ruleValue == items[i][0]:
res.append(items[i])
elif ruleKey == "color" and ruleValue == items[i][1]:
res.append(items[i])
elif ruleKey == "name" and ruleValue == items[i][2]:
res.append(items[i])
return len(res)
class Solution:
def findKthLargest(self, nums: List[int], k: int) -> int:
return sorted(nums)[len(nums) - k]
class Solution:
def mostCommonWord(self, paragraph: str, banned: List[str]) -> str:
paragraph = paragraph.lower()
punctuation = '''!()-[]{};:'"\,<>./?@#$%^&*_~'''
for i in paragraph:
if i in punctuation:
paragraph = paragraph.replace(i, " ")
words = paragraph.split()
unique_words = " ".join(sorted(set(words), key=words.index)).split()
for i in unique_words[:]:
if i in banned:
unique_words.remove(i)
res = {}
for i in paragraph.split():
if i in unique_words:
res[i] = paragraph.split().count(i)
return max(res, key=res.get)
class Solution:
def thousandSeparator(self, n: int) -> str:
return '{:,}'.format(n).replace(',', '.')
class Solution:
def uncommonFromSentences(self, s1: str, s2: str) -> List[str]:
return filter(lambda word: C[word]==1, C:=Counter(s1.split() + s2.split()))
class Solution:
def numberOfSteps(self, num: int) -> int:
step = 0
while num:
if num % 2:
num -= 1
else:
num /= 2
step += 1
return step
class Solution:
def checkIfExist(self, arr: List[int]) -> bool:
if len(arr) < 2:
return False
set_nums = {}
for i in range(len(arr)):
set_nums[arr[i]] = i
for i in range(len(arr)):
num = arr[i]
if num * 2 in set_nums and set_nums[num*2] != i:
return True
return False
class Solution:
def isThree(self, n: int) -> bool:
divisors = []
for i in range(1, n+1):
if n % i == 0:
divisors.append(i)
if len(divisors) == 3:
return True
else:
return False
class Solution:
def sumOfUnique(self, nums: List[int]) -> int:
return sum(i for i in nums if nums.count(i) == 1)
class Solution:
def isAnagram(self, s: str, t: str) -> bool:
s_dict = Counter(s)
t_dict = Counter(t)
return s_dict == t_dict
class Solution:
def checkIfPangram(self, sentence: str) -> bool:
return len(set(sentence)) == 26
class Solution:
def addToArrayForm(self, num: List[int], k: int) -> List[int]:
str_nums = [str(int) for int in num]
int_num = int("".join(str_nums))
sum_int = int_num + k
return list(map(int, str(sum_int)))
class Solution:
def isPrefixOfWord(self, sentence: str, searchWord: str) -> int:
import re
count = 0
for word in sentence.split():
count += 1
if re.findall(f"^{searchWord}", word) != []:
return count
return -1
class Solution:
def addBinary(self, a: str, b: str) -> str:
return bin(int(a, 2) + int(b, 2))[2:]
class Solution:
def reversePrefix(self, word: str, ch: str) -> str:
import re
if re.findall(f"[a-zA-Z]*{ch}[a-zA-Z]*", word) == []:
return word
count = 0
for i in word:
count += 1
if i == ch:
tempRes = word[0:count]
return tempRes[::-1] + word[count:len(word)]
class Solution:
def reverseOnlyLetters(self, s: str) -> str:
temp_arr = [i for i in s[::-1] if i.isalpha()]
for i in range(len(s)):
if not s[i].isalpha():
temp_arr.insert(i, s[i])
res = ''.join(temp_arr)
return res
class Solution:
def findSpecialInteger(self, arr: List[int]) -> int:
number_count = { k:arr.count(k) for k in set(arr) }
threshold = len(arr) * 0.25
for key, value in number_count.items():
if value > threshold:
return key
class Solution:
def canBeTypedWords(self, text: str, brokenLetters: str) -> int:
letter_set = set(brokenLetters)
res = 0
for word in text.split(' '):
flag = 1
for el in word:
if el in letter_set:
flag = 0
break
res += flag
return res
class Solution:
def arrangeWords(self, text: str) -> str:
return ' '.join(sorted(text.split(), key=len)).capitalize()
class Solution:
def addDigits(self, num: int) -> int:
res = 0
while num > 0:
res += num % 10
num = num // 10
if num == 0 and res > 9:
num = res
res = 0
return res
class Solution:
def addStrings(self, num1: str, num2: str) -> str:
return str(int(num1) + int(num2))
class Solution:
def tribonacci(self, n: int) -> int:
if n == 0:
return 0
if n == 1:
return 1
if n == 2:
return 1
a, b, c = 0, 1, 1
n -= 2
while n:
temp = c
c = a + b + c
a = b
b = temp
n -= 1
return c
class Solution:
def findTheDifference(self, s: str, t: str) -> str:
for i in t:
if i not in s or s.count(i) != t.count(i):
return i
class Solution:
def singleNumber(self, nums: List[int]) -> int:
return [el for el, cnt in Counter(nums).items() if cnt==1].pop()
class Solution:
def myPow(self, x: float, n: int) -> float:
return x ** n
class Solution:
def removeElement(self, nums: List[int], val: int) -> int:
j = 0
for i in range(len(nums)):
if nums[i] != val:
nums[j] = nums[i]
j += 1
return j
Started with Remove Element. I expect to make many more stupid mistakes in December when it comes to Python.
Completed Move Zeros, this took a lot longer than expected:
class Solution:
def moveZeroes(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
counter = 0
for i in range(len(nums)):
if nums[i] == 0:
counter += 1
while 0 in nums: nums.remove(0)
for j in range(counter):
nums.append(0)
class Solution:
def heightChecker(self, heights: List[int]) -> int:
expected = sorted(heights)
differences = [x - y for (x, y) in zip(heights, expected)]
indices = []
for i in range(len(differences)):
if differences[i] != 0:
indices.append(i)
return len(indices)
np.log10()
instead of np.log()
) I also got another response for my post.class Solution:
def isPowerOfThree(self, n: int) -> bool:
import numpy as np
if (np.log10(n) / np.log10(3)).is_integer():
return True
else:
return False
class Solution:
def isPowerOfFour(self, n: int) -> bool:
import numpy as np
if (np.log(n) / np.log(4)).is_integer():
return True
else:
return False
class Solution:
def isPowerOfTwo(self, n: int) -> bool:
import numpy as np
if (np.log2(n)).is_integer():
return True
else:
return False
class Solution:
def getConcatenation(self, nums: List[int]) -> List[int]:
return nums + nums
So, I opened up a discussion post about it.
Started with Concatenation of Array.
Completed Valid Palindrome.
Completed Implement strStr()
Completed Length of Last Word.
Completed Merge Two Sorted Lists.
Completed Roman to Integer.
Completed Sqrt(x).
Continued with Top Interview Questions.
Trying to finish the maximum problems I can from the Top Interview Questions before my MLAB coding test. Did 4 today. Also learnt the three recommended questions by them.
Progress! Completed Plus One and FizzBuzz without looking at the solution.
Completed a few easy problems, but had to look at the solution for all of them.
Dec 13, 2022-present
Trying to practice different programming languages with Codewars (LeetCode is for harder, more Python-oriented problems). Currently inactive.
def valid_ISBN10(isbn):
if len(isbn) != 10:
return False
first_9 = isbn[:-1]
last_digit = isbn[-1]
total = 0
try:
total += sum([int(first_9[i]) * (i + 1) for i in range(len(first_9))])
except:
return False
if last_digit.isdigit():
total += int(last_digit) * 10
elif last_digit == "X":
total += 100
else:
return False
return total % 11 == 0
def solution(array_a, array_b):
return sum((array_a[i] - array_b[i]) ** 2 for i in range(len(array_a))) / len(array_a)
def find_uniq(arr):
return [i for i in set(arr) if arr.count(i) == 1][0]
Couldn't solve a problem today, but that's okay.
Finished First non-repeating character in Python:
def first_non_repeating_letter(string):
for i in range(len(string)):
if len([j for j in range(len(string)) if string[j].lower() == string[i].lower() and j != i]) == 0:
return string[i]
else:
return ""
def make_readable(seconds):
hours = seconds // 3600
minutes = (seconds - (hours * 3600)) // 60
seconds_print = seconds - (minutes * 60) - (hours * 3600)
if len(str(hours)) < 2:
hours = "0" + str(hours)
if len(str(minutes)) < 2:
minutes = "0" + str(minutes)
if len(str(seconds_print)) < 2:
seconds_print = "0" + str(seconds_print)
return f"{hours}:{minutes}:{seconds_print}"
def cakes(recipe, available):
count = 0
max_scale = []
for k, v in recipe.items():
if k not in available:
max_scale = [0]
else:
if available[k] < v:
max_scale = [0]
else:
max_scale.append(available[k] // v)
count = min(max_scale, default=0)
return count
Still no luck.
Trying to solve Catching Car Mileage Numbers
Tried to solve a couple of problems in Python, but to no avail.
Finished Does my number look big in this? in Python:
def narcissistic(value):
return sum([int(i) ** len(str(value)) for i in str(value)]) == value
def pig_it(text):
res = []
for i in text.split(" "):
if i.isalpha():
word = i[1:] + i[0] + "ay"
res.append(word)
else:
res.append(i)
return " ".join(res)
def count_smileys(arr):
valid_smiley_faces = [':)', ';)', ':-)', ';-)', ':~)', ';~)', ':D', ';D', ':-D', ';-D', ':~D', ';~D', ':D', ';D']
return len([i for i in arr if i in valid_smiley_faces])
def comp(array1, array2):
if array1 == None or array2 == None:
return False
if sorted([i**2 for i in array1]) == sorted(array2):
return True
else:
return False
def move_zeros(lst):
return [i for i in lst if i != 0] + [i for i in lst if i == 0]
import math
def persistence(n):
count = 0
while len(str(n)) != 1:
n = math.prod([int(i) for i in str(n)])
count += 1
return count
def zero(operand_num=""): #your code here
return eval("0" + operand_num)
def one(operand_num=""): #your code here
return eval("1" + operand_num)
def two(operand_num=""): #your code here
return eval("2" + operand_num)
def three(operand_num=""): #your code here
return eval("3" + operand_num)
def four(operand_num=""): #your code here
return eval("4" + operand_num)
def five(operand_num=""): #your code here
return eval("5" + operand_num)
def six(operand_num=""): #your code here
return eval("6" + operand_num)
def seven(operand_num=""): #your code here
return eval("7" + operand_num)
def eight(operand_num=""): #your code here
return eval("8" + operand_num)
def nine(operand_num=""): #your code here
return eval("9" + operand_num)
def plus(num): #your code here
return f"+{num}"
def minus(num): #your code here
return f"-{num}"
def times(num): #your code here
return f"*{num}"
def divided_by(num): #your code here
return f"//{num}"
def solution(s):
res = ""
for i in s:
if ord(i) >= 65 and ord(i) <= 90:
res += f" {i}"
else:
res += i
return res
def friend(x):
return [i for i in x if len(i) == 4]
def sum_two_smallest_numbers(numbers):
return min(numbers) + min([i for i in numbers if i != min(numbers)])
def high_and_low(numbers):
return f"{max([int(i) for i in numbers.split(' ')])} {min([int(i) for i in numbers.split(' ')])}"
from preloaded import MORSE_CODE
def decode_morse(morse_code):
# Remember - you can use the preloaded MORSE_CODE dictionary:
# For example:
# MORSE_CODE['.-'] = 'A'
# MORSE_CODE['--...'] = '7'
# MORSE_CODE['...-..-'] = '$'
temp_morse_code = morse_code.strip().split(' ')
decoded_message = []
for i in temp_morse_code:
for j in i.split(' '):
decoded_message.append(MORSE_CODE[j])
decoded_message.append(" ")
return "".join(decoded_message).rstrip()
def filter_list(l):
return [i for i in l if str(i).isdigit() and isinstance(i, int)]
def solution(string, ending):
if ending == '':
return True
else:
if ending in string:
if string[len(string) - len(ending):] == ending:
return True
else:
return False
else:
return False
import java.util.ArrayList;
public class FindOdd {
public static int findIt(int[] a) {
ArrayList<Integer> count_al = new ArrayList<Integer>();
for (int i = 0; i < a.length; i++) {
int number = a[i];
int count = 0;
for (int j = 0; j < a.length; j++) {
if (a[j] == number) {
count++;
}
}
count_al.add(count);
}
for (int i = 0; i < count_al.size(); i++) {
if (count_al.get(i) % 2 != 0) {
return a[i];
}
}
return 0;
}
}
def solution(s):
print(s)
if len(s) % 2 != 0:
temp_res = [s[i:i+2] for i in range(0, len(s), 2)]
temp_res[-1] = temp_res[-1] + "_"
return temp_res
else:
return [s[i:i+2] for i in range(0, len(s), 2)]
public class Kata {
public static String createPhoneNumber(int[] numbers) {
String phoneNumber = "(" + String.valueOf(numbers[0]) + String.valueOf(numbers[1]) + String.valueOf(numbers[2]) + ") " + String.valueOf(numbers[3]) + String.valueOf(numbers[4]) + String.valueOf(numbers[5]) + "-" + String.valueOf(numbers[6]) + String.valueOf(numbers[7]) + String.valueOf(numbers[8]) + String.valueOf(numbers[9]);
return phoneNumber;
}
}
import java.util.ArrayList;
public class DescendingOrder {
public static int sortDesc(final int num) {
int temp = num;
ArrayList<Integer> digits = new ArrayList<Integer>();
while (temp != 0) { // while loop for appending digits
int digit = temp % 10;
digits.add(digit);
temp /= 10;
}
for (int i = 0; i < digits.size() - 1; i++) { // for loops for sorting - bubble sort
for (int j = 0; j < digits.size() - 1 - i; j++) {
if (digits.get(i + j + 1) > digits.get(i)) {
int temp_digit = digits.get(i);
digits.set(i, digits.get(i + j + 1));
digits.set(i + j + 1, temp_digit);
}
}
}
int res = 0;
for (int i = 0; i < digits.size(); i++) { // converting list of digits to int
int digit = digits.get(i);
res = (res * 10) + digit;
}
return res;
}
}
import java.util.ArrayList;
public class SpinWords {
public String spinWords(String sentence) {
String[] words = sentence.split(" "); // credit - https://www.geeksforgeeks.org/split-string-java-examples/
ArrayList<String> tempRes = new ArrayList<String>(); // creating a temp ArrayList for words
for (int i = 0; i < words.length; i++) {
if (words[i].length() >= 5) {
String reverseString = "";
for (int j = words[i].length() - 1; j >= 0; j--) { // inner for-loop for reversing the string
reverseString += words[i].charAt(j);
}
tempRes.add(reverseString);
} else {
tempRes.add(words[i]);
}
}
String res = String.join(" ", tempRes); // credit - https://stackoverflow.com/questions/599161/best-way-to-convert-an-arraylist-to-a-string
return res;
}
}
public class Solution {
public int solution(int number) {
if (number < 0) {
return -1; // returning -1 if the number is negative
} else {
int res = 0;
for (int i = 1; i < number; i++) {
if (i % 3 == 0 || i % 5 == 0) { // only counting the number once if multiple of 15
res += i;
}
}
return res;
}
}
}
public class Accumul {
public static String accum(String s) {
String res = ""; // result string
for (int i = 0; i < s.length(); i++) {
char chr = s.charAt(i); // getting character at each index
res += Character.toUpperCase(chr); // converting character to uppercase
for (int j = 0; j < i; j++) {
char chr_repeat = s.charAt(i); // repeatedly getting the same character based on index
res += Character.toLowerCase(chr_repeat); // converting character to lowercase
}
if (i != s.length() - 1) { // as long as not last character, add hyphen
res += "-";
}
}
return res;
}
}
function isTriangle(a, b, c) {
if (a + b > c && b + c > a && a + c > b) return true;
else return false;
}
function getCount(str) {
let count = 0;
for (let i = 0; i < str.length; i++) {
if (
str[i] == "a" ||
str[i] == "e" ||
str[i] == "i" ||
str[i] == "o" ||
str[i] == "u"
)
count++;
}
return count;
}
Dec 24, 2022-present
Trying to co-run the second edition of a logic, rationality and Effective Altruism club that I co-founded. Currently inactive/paused.
Did some organisational work.
Did some organisational work.
Sent out my three capstone project reviews.
Had the last meeting for a while, thus marking the end of this project (for now!)
Scheduled the last meeting for a while.
Finished reviewing two more capstone projects.
Reviewed the first capstone project.
Received capstone projects. Closing ceremony will be delayed but for now, will host an online meeting to discuss the projects.
In discussion regarding the closing ceremony.
In discussion regarding the closing ceremony.
Did some more organisational work, held the last (technically fourth) day and sent out the capstone project submission form!
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some organisational work.
Did some more organisational work. Here's to this project becoming even more ambitious in 2023!
Did some organisational work in the morning, but I couldn't teach today's class due to internet issues. We'll be combining this session and the last day (which I feel is something we should do regardless).
An okay third day, but this part of the syllabus really needs to be re-vamped.
Second day went better than the first: espicially since we had really good debate responses and rebuttals.
First day! Along with my co-facilitator, we gave a good overview about rationality.
Aug 02, 2022-present
Trying to get better every day and have some fun as well. Currently inactive/paused.
Sort of messed around for a bit.
Played Fever by The Black Keys.
Played I Want to Break Free by Queen.
Finished learning Back in Black by AC/DC. The snare-kick-hi-hat pattern was the only thing I had to get down.
Played Back in Black by AC/DC.
Played Yellow by Coldplay.
Oct 28, 2021-present
Trying to get better at chess via practicing on lichess. You can see all my games that I refer to here. Previously, I practiced on chess.com. Currently inactive.
Oops.
Good game! (I mean, it was barely passable at my end, but it was fun nonetheless)
Hmm.
This is, probably by a lot, the most surprising checkmate I've received.
Sigh.
Decided to play sort of fast and loose with this game, turns out I was too fast and loose.
I'm very angry with myself over this game.
I hate unexpected checkmates.
Interesting game, made a lot of silly blunders.
An Antichess Tragedy. Will get back to regular chess tomorrow.
Rough game. I had like ~4 takebacks over move 15 lol.
Saddest game ever. I couldn't save myself at some point even with takebacks.
A good game to end of the week (even though I lost).
Anitchess! (with a lot of takebacks, I'll get back to non-variant chess tomorrow)
Sometimes even takebacks can't save you from a terrible game.
A near perfect game (but not really, also 3 takebacks)
Shockingly, only 1 blunder (though that's because it was so short lol)
Played a Chess960 game for fun.
Another Antichess game.
No clue what I was doing here.
Took me forever to checkmate with just a king and a queen, but I did it! (overall, with 1 takeback)
Defeated Stockfish Level 4 with intense focus... and like 3 takebacks lol.
Drew Stockfish Level 4 with (very roughly) 15 takebacks.
I liked this game a lot (even though I lost).
Oof.
I thought I played well in this game. Nope, 11 blunders (I also missed such an obvious check that could have potentially won the game).
Another win! (though I did takeback once)
What a way to start off the month: defeated Stockfish Level 4 without takebacks with the black pieces (only 1 blunder from my side!)
One of my shortest game ever (also drew Level 4 after a couple of takebacks).
Sigh.
I think I need to go back to Level 3.
I won using the Tennison Gambit! (note: this doesn't count towards my battle against Stockfish Level 4 lol)
Sigh.
I think this one counts, I did takeback once but it was accidental.
Another game that doesn't really count because of takebacks.
The uphill battle against Stockfish Level 4 is going to be a long one...
This WOULD have been my first win against Stockfish Level 4 if I hadn't taken back so many times in the endgame (still a fun game!)
Nice.
Sigh.
Ouch, I don't think there were any good moves at move 15 lol.
Possibly the wildest game I've ever played. I was so close to losing and then I pulled up with the promotion that made me win with the black pieces!
I need to practice with the black pieces against Stockfish Level 3. I'm fine with the white pieces.
Maybe a simple 1. e4 with good opening principles and development is all you need at this level.
No idea what I did today for chess today. I need to change my opening repertoire.
I present to you, the biggest throw ever.
I feel like Stockfish wanted to throw an April Fools' Day joke at me...
Sigh.
Not sure what I was doing today.
Stockfish Level 4 made me suffer in the last few moves. We quickly went from the best game yet to possibly the worst game yet lol.
My best game yet with the King's Indian Setup, no blunders and I never lost the advantage + didn't lose a forced checkmate sequence lol. Played a few other King's Indian Setups as well (1, 2)
I threw away a game so badly that I'm actually disappointed in myself. At least the King's Indian Setup has proven its worth to me with the white pieces.
I think this will be my opening repertoire: black pieces with e4 will be the Caro-Kann Defense and anything else (white or black pieces) will mean the King's Indian Setup (need to study this one).
This game definitely doesn't count (took back a lot of blunders) but it was so calming to checkmate my opponent with three queens while listening to Pentatonic.
Explored the Blackmar-Diemer Gambit (also this game doesn't count as a win because I used so many takebacks lol)
I was trying out the Italian Game and I got this gem of a game, so I guess my opening with the white pieces is now the Italian Game? Need to study it for some time.
My best worst game ever. I thought I was being smart with the pawn promotion sacrifice but nope.
Haha! Pawn to knight promotion leads to checkmate (Note: I did do a couple of take backs).
Yeah, that game didn't go too well... Also played a few random games against bots for fun.
Started learning the Giuoco Piano opening and I got pretty far with it against Stockfish Level 3.
Lost against my classmate after exchange variation. I thought move 22 was sort of smart but nope it was a blunder lol.
This is most definitely the best game I've ever played so far. Only one blunder with the Caro-Kann exchange variation and man was the endgame fun.
Just sort of fooled around a bit. Second game wasn't too horrible (but I had no idea how to continue), 1, 2.
Stockfish Level 2 is too easy and level 3 is too "meh" (can sometimes win if I'm focused) and I've noticed that very low rated bots just give up their queens sometimes.
Resigned after losing my queen, though I performed a "push" variation of the Caro-Kann without referring back to the video!
Lost that game and played my most humiliating game yet.
Started an interesting exchange variation, I have no idea where to go from here.
Finished yesterday's game, did not go well.
Started a really interesting game after the classical variation.
Continued learning the advanced variation.
Continued learning the advanced variation.
This one is just funny, got checkmated in 20 moves lol.
Learnt some lines against the Fanatasy Caro-Kann variation.
This may be the angriest I've been with myself over a chess game. Two major blunders from a Caro-Kann opening.
Continued with the Caro-Kann Defense.
Continued with the Caro-Kann Defense.
Continued with the Caro-Kann Defense.
Continued with the Caro-Kann Defense.
Started learning the Caro-Kann Defense via GothamChess and (sort of) played it against Stockfish Level 1.
For fun, I played against Stockfish Level 4 twice (1, 2). Will learn an opening tomorrow and practice it against Level 3 and 4.
Finished with Knight & Bishop Mate, which means I've finished the whole practice section!
Finished with 7th Rank Rook Pawn (Passive)!
Started with 7th Rank Rook Pawn (Passive).
Finished with 7th Rank Rook Pawn!
Continued with 7th Rank Rook Pawn. Will be done with this tomorrow!
Continued with 7th Rank Rook Pawn. Nearly done.
Continued with 7th Rank Rook Pawn.
Continued with 7th Rank Rook Pawn.
Started with 7th-Rank Rook Pawn, this section is quite long!
Finished Opposition, really cool practice section!
Finished the Direct Opposition part of Opposition.
Finished with Key Squares.
Started with Key Squares.
Continued with my Knight and Bishop Mate lesson.
Finished with Desperado.
Finished with Deflection.
Finished with Attraction
Finished with Counter Check.
Finished with Undermining.
Finished with X-Ray.
Finished with Interference, really interesting!
Finished with Zugzwang (my new favourite word) and Underpromotion
Finished with Overloaded Pieces and got close, but ultimately still resigned to Stockfish Level 4 after a long break.
Finished with Double Check and Zwischenzug.
Finished with Discovered Attacks.
Started with Discovered Attacks.
Finished The Fork! Will start Discovered Attacks tomorrow.
Continued with The Fork.
Started with The Fork.
Going to actually practice chess by learning theory and finishing my practice on lichess (+ doing a puzzle every day starting from tomorrow). Finished learning about skewers.
Lost two games (1, 2), one against Stockfish Level 4 and against a person in rapid.
I HAD TWO QUEENS AND I STILL STALEMATED STOCKFISH LEVEL 4! This is why there are so few grandmasters.
Resigned again in my final game against my brother.
Resigned against my brother.
Checkmated Stockfish Level 3, it shocks me how well made lichess is, all for free and open-source.
Continued my Knight & Bishop Mate lessons.
Learnt about the Greek Gift and won against my brother as black via resignation.
Lost a couple of games, but at least I beat level 3.
Lost countless number of times to bots and 2 times in Blitz, hope to see some improvement in 2022 for chess.
Lost to my brother twice in Blitz.
Stockfish Level 4 got a surprise checkmate for me as a belated Christmas gift...
Stockfish Level 4 is still out of reach, lost three games. (1, 2, 3)
Won against my brother via resignation.
Lost (badly) to Stockfish Level 4 in three games (1, 2, 3). At least I won twice against my brother.
Lost (badly) to my brother in chess.
Played 4 games against Stockfish Level 3 (1, 2, 3, 4) which resulted in 2 losses (1 checkmate and 1 resignation), a stalemate (which resulted in a facepalm) and a win!
Played 3 games against Stockfish Level 2 (1, 2, 3), I was so close to losing in the 3rd game, then the bot makes a huge, huge blunder by not taking my queen with his bishop, which led to checkmate.
Played 3 games against Stockfish Level 1 (1, 2, 3) and got checkmate in the first and last game. My revenge against Level 1 is complete.
Stalemated Level 1 again, how does this keep happening?
I am so bad at chess it's funny, I played three games (1, 2, 3) with the first being a loss to Stockfish Level 3, to boost my confidence I played against Level 1 and somehow lost and stalemated respectively.
Played two games this time (1, 2) and the second one was very interesting.
Played three games against Stockfish Level 3 and lost all three.
Checkmated Stockfish Level 2 as black!
So close to checkmating Stockfish Level 2! Alas, I stalemated.
Started with the Knight & Bishop Mate, messed up against Stockfish Level 2 and finished The Pin.
Got destroyed by Stockfish Level 2 and finished Piece Checkmates II.
Continued with Piece Checkmates II.
Started with Piece Checkmates II
Finished with Checkmate Patterns IV.
Started with Checkmate Patterns IV and had a fun game against Stockfish Level 1. Magnus might win today, but we'll see. (Edit: Draw.)
Finished Checkmate Patterns III. I smell a draw for today's match, both Magnus and Nepo will be well-rested. (Edit: I'm so sorry Nepo.)
Started with Checkmate Patterns III.
Continued with Checkmate Patterns II. I'm going to take a risk and say that Nepo wins today. Let's see if I'm right. (Edit: I was very wrong.)
Continued with Checkmate Patterns II. Magnus won the sixth game and he and Ian now have the longest game in a World Chess Championship!
Won against my dad with the black pieces via checkmate.
Started Checkmate Patterns II.
Completed Checkmate Patterns I. Pretty sure today's World Chess Championship match is going to be a draw. (Edit: I was right.)
Started with Checkmate Patterns I, what a crazy month for chess!
Finished Piece Checkmates I and got absolutely destroyed by Stockfish Level 2.
Started with Piece Checkmates I and played my first game on lichess v.s. Stockfish level 1.
Finished the "learning section" of the chess course!
Switched to lichess and started their chess course.
Damn, my game against Antonio today was incredible (even though I lost). I got 74 accuracy! Here's the game.
Completed the Value of the Pieces and had some fun learning about the Stafford Gambit
Antonio is really tough.
Antonio is tough.
Defeated Nelson with the black pieces! Here's the game.
Played 2 games with Nelson, and drew one!
Very close to winning against Nelson, but I eventually lost way too much material.
"One day Sven, one day." Well folks, that day finally came! I checkmated Sven with the black pieces!
Played several games online.
One day Sven, one day. Also played a really, really funny blitz game where my opponent only moved their king for the majority of the game.
Finished my weekly lesson.
Drew Sven due to a mouse slip. Here is the game.
Thinking about (seriously) playing online.
Had some fun with lower-rated bots.
Completed my weekly lesson. Moved away from Sven, and (for fun) I tried my hand at DanyaBot, I'm actually proud to say I only made 1 blunder (even though I lost).
I think I will put the bots on the side and try to actually study the game instead of brute-forcing it.
Same old, same old. I also had some fun analyzing games and learning the Caro-Kann. Later, I won against my dad with the black pieces via checkmate.
So close! I blundered my queen again. I'll get three crowns against Sven sooner or later.
I was so close but I blundered too many times.
1000 -> 1100 transition is tough.
Jumped around different bots. Need to defeat Sven with three crowns soon.
I played against Jimmy ~3 times, blundering my queen in the first two games, but winning in the last. Here's that last game. Later, I played two games against my dad, I think the first one was a draw? (no legal moves but not in check) and the second one was a win via resignation.
I finally defeated the pumpkin 3 days after Halloween. Here's the game. I also resigned against Sven again.
So close, but I hanged my queen accidentally.
I hate pumpkins. (Also, I completed a lesson on rook checkmates.)
Resigned against Sven for the quadrillionth time.
Tried to defeat the damn Pumpkin, was close but blundered the endgame.
Kept resigning against Sven. Later in the day, I learnt about the Scandinavian Defense and won against my dad with the white pieces via checkmate!
Kept resigning against Sven and finished the Assisted Checkmate lesson.
Sep 02, 2022-present
Trying to learn as much as I can about AI safety in this fellowship! Currently paused (tough luck honestly, cohorts that I got accepted to clashed with important exams.)
Another great session with my cohort, though I don't know if I contributed that much to the conversation.
Had a great first meeting with my cohort and did okay on the exercise questions.
Oct 29, 2021-present
Trying to learn acoustic guitar via justinguitar.com. Currently inactive/paused.
Learnt some open 7th chords.
(Tried) to learn Hey You by Pink Floyd.
Freestyled to ease back in.
Continued with Module 4 practice.
"Learnt" the intro to Chop Suey! Drop C tuning is awesome.
Practiced a sliding power chord song that was recommended to us (why do almost all of them have iffy names?)
Got started with Module 4 practice.
Finished learning an easier version of Enter Sandman.
"Finished" with the Module 5 videos (sort of just skipped a few) and will get started with the practice tomorrow.
Played an electric guitar for the first time!
Finished a short video in the module. I guess I've been less motivated to continue with this module since it's so electric guitar focused (though maybe I'm wrong and my skill is to blame here, not the acoustic)
Sort of continued with the riff.
Learnt the first part of the first part of the Enter Sandman riff.
Finished with Palm Muting and Understanding Distortion. This module is irritating if you're using an acoustic. Why do you have to be so cool, electric?.
Finished with The Am Pentatonic Scale.
Finished with Power Chords (and sort of learnt Smells Like Teen Spirit?)
Got started with Power Chords.
Six days... Finished with the second iteration of Module 4 practice.
Continued with the second iteration of Module 4 practice. I finally understood why my guitar improv is so bad: I keep trying to play odd patterns.
Continued with the second iteration of Module 4 practice.
Got started with the second iteration of Module 4 practice.
Finished with the first iteration of Module 4 practice.
Continued with the first iteration of Module 4 practice.
Got my guitar repaired!
Continued with the first iteration of Module 4 practice, will be done with it tomorrow (welp, a guitar string broke again, so I'll try my best to get back to the practice ASAP).
Finished with the Module 4 videos and got started with the first iteration of Module 4 practice. I think I'm going to increase the number of iterations to three.
Finished dice songwriting. Really fun lesson! (even though I didn't do too much lol)
Finished learning about the songs for this module (excited for the fingerstyle songs for the first iteration).
Finished some ear training, felt pretty disheartened after getting the last exercise wrong.
Had fun with this lesson.
It took roughly a week but I can finally play Happy Birthday on my own!
Hopefully I should be able to play it tomorrow...
So close to playing Happy Birthday on my own!
Continued with learning Happy Birthday, about two-thirds of the way there.
Continued with learning Happy Birthday.
Got started with learning Happy Birthday and had some fun with learning All Falls Down (I guess I've learnt it? It sounds pretty bad though).
Learnt more about fingerstyle playing.
Had fun playing How Much A Dollar Cost with these chords (simplified) (only the F#, F and Dm sounded okay lol)
Finished with shifting the F chord. The way Justin played the F chord reminded me How Much a Dollar Cost by Kendrick Lamar. I'm going to try to play that tomorrow.
Got started with Module 11 with some sus chords, I really like the transition from A sus2 to A sus4.
Finished with the second iteration of Module 10 practice!
Continued with the second iteration of Module 10 practice. Nearly done!
Continued with the second iteration of Module 10 practice.
Continued with the second iteration of Module 10 practice, I thought I forgot the C Major scale but nope, my guitar was just slightly out of tune lol.
Got started with the second iteration of Module 10 practice.
Finished with the first iteration of Module 10 practice! Also, small correction: I don't use the songbook tab on JustinGuitar.com (since it forces the song into three categories, which I don't like) and instead I just like the play-through video (which acts as a songbook).
Continued with Module 10 practice and added two songs to my songbook!
Continued with Module 10 practice, F (with bar) chord is shaping up to be pretty decent now (similar sounding to a Fmaj7) but the change from F to C is slow for me lol.
Continued with Module 10 practice and did some really bad C Major improvisation (why did I choose the thinnest string?)
Continued (?) with Module 10 practice.
Finished with the Module 10 videos and got started with the first iteration of Module 10 practice (sort of, I need to start over with the C major scale alternate picking).
Learnt some common chord progressions.
Finished with La Bamba Riff (learnt the double note variation).
Finished with Beginner Hammer-ons which are super tricky and learnt the single note variation of the La Bamba riff, which is super awesome.
Finished with The Rhythm Push and also discovered that the 11th fret of the thinnest string sounds almost exactly like the "siren" sample in Use This Gospel.
Finished with Alternate Picking C Major and Major Scale Improvisation (really excited to start guitar improv in this module's practice!)
Finished with F chord changes and feeling the frets.
Learnt about the weak finger G (which I dislike, for now...) and the A mini barre (which I kinda dig)
Finished the second iteration of Module 9 practice! Will start Module 10 tomorrow.
Continued with the second iteration of Module 9 practice.
Continued with the second iteration of Module 9 practice.
Got started with the second iteration of Module 9 practice.
Finished the first iteration of Module 9 practice, will start the second iteration tomorrow.
I did it! I learnt the C Major Scale! I leveraged the previous pattern I learnt for the note circle.
Continued with the first iteration of Module 9 practice and played One by U2.
Continued with the first iteration of Module 9 practice. Something barely impressive: I can play the C-G-D-A-Em chord transition without looking at the guitar (kind of).
Continued with the first iteration of Module 9 practice, the guitar chords Notion page is extremely handy!
Revised the Em Pentatonic Scale.
Continued with the first iteration of Module 9 practice.
Got started with the first iteration of Module 9 practice.
Finished with the Module 9 lessons, will be on the practice for some time (due to the C Major scale lol)
Finished with the Red Hot Chili Peppers riff (minus the chords, might do that for fun).
Got my guitar strings replaced, I've never heard a guitar so out of tune before lol.
It wouldn't be a JustinGuitar module without an odd finger training exercise. I was planning on finishing up the Red Hot Chili Peppers riff today (since it's pretty easy) but my D string broke :(
Finished with more advanced 16th note strumming.
Got done with compiling all the chords in a Notion page.
Changed my mind, the C Major scale got to me lol. I'll start the chord book work tomorrow.
Finished with All Stop Mute and creating a chord book (which I will do from tomorrow instead of the videos.)
Finished with learning the F chord and its variations. It honestly isn't impossible but it certainly is tricky. Maybe I'm just lucky.
Finished with the second iteration of Module 8 practice! Will start Module 9 and the dreaded F chord soon.
Continued with the second iteration of Module 8 practice, nearly done.
Continued with the second iteration of Module 8 practice.
Started with the second iteration of Module 8 practice, why does my E min7 chord sound so bad?
Finished with the first iteration of Module 8 practice! I'll start it all over again tomorrow.
Continued with Module 8 practice.
I think I'm done learning the riff! I'll check back tomorrow to see if I still remember it.
Continued with the Wish You Were Here riff.
I've been listening to Wish You Were Here by Pink Floyd in preparation for finishing the riff. I guess it helped a bit? Anyways, almost finished learning the riff and just a few more items are left for the first iteration of Module 1 practice!
Continued with Module 8 practice.
Continued with Module 8 practice. I stink at Big G to D chord transitions.
Memorized all the Stuck 3&4 chords!
3 days... Anyways, I've finished with all the content and I'll start with the practice tomorrow (for real this time!), it'll probably last ~2 weeks since I'll repeat it.
Finished with the Wish You Were Here riff video, sort of got the introduction down. Will start the practice soon!
Finished with Notes in Open Position and got started with the Wish You Were Here riff, the riff is super hard!
Finished with Pick Manipulation.
Finished with All Down 8th Note Strumming, really had a lot fun today in this lesson! Strumming can sometimes be fun.
Finished with Muting Strings Deliberately.
I have no excuses for not playing guitar for 4 days. Anyways, learnt about a new exercise routine and the Open Em Pentatonic scale.
Learnt a ton of chord variations. Going to be slightly hard to remember and practice all of them :(
Finished Module 7 practice. Going to start Grade 2 (in guitar!) on the weekend.
It's been a while and I finished memorizing two more songs (mainly Mad World) and I only have two more before I finish all my pre-requisites! The memorizing and practising also continued my Module 7 practice.
Continued with Module 7's practice.
Finished all the content of the last module for Grade 1 and got started with the practice, this (and the last pre-requisite) should be done in about 2 weeks time.
Finished all the pre-requisites for Grade 2 except for memorizing the songs, still have 4-ish left.
We did it! We'll soon be in Grade 2 after I complete the pre-requisites and the practice for this module.
Learnt about the extra modules that JustinGuitar provides (outside of the grades).
Learnt more about Dynamics.
Learnt about open strings between chord changes and feel good strumming.
Learnt about the best chord changes to practice and air changes.
Started the last module with a revision on the 8 basic chords.
Finished with the second iteration of practice (!) and practised Mad World. Will start the last module of Grade 1 tomorrow.
Continued with the second iteration of practice and Hey Joe. Nearly done.
Continued with the second iteration of practice and Hey Joe.
Started the second iteration of practice and added Hey Joe and Mad World to my songbook!
Finished Module 6 practice and played quite alright for this module's song, Hey Joe.
Continued with Module 6 practice, I only have the song practice left!
Continued with Module 6 practice.
Started with Module 6 practice. After this and the second iteration, I will have moved on to the last module of Grade 1!
Finished Module 6! Will start the practice soon.
Learnt a strumming pattern in 6:8 timing and string names.
Learnt about 6:8 timing.
Learnt about alternate picking and a variation of the G chord.
Finished the second iteration of practice and added Black to my songbook!
Only song practice is left for the second iteration of practice! Also, I am very bad at transitioning from C chord to E chord.
Continued the second iteration of practice.
Sorry, I forgot what tomorrow meant, anyways, I started with the second iteration with the odd finger stretching exercise and the riff practice, will continue with the iteration tomorrow...
Completed the first iteration! Will start the Module 5 practice once again tomorrow.
Continued with Module 5 practice. Only song practice is left for iteration 1.
Continued with Module 5 practice.
Started with Module 5 practice.
Finished Module 5, will take the next week solely for practice. Also going to build a songbook next week.
Watched the Songs For Module 5 video and tried my hands at Daft Punk, let's just say that I'll be practising Daft Punk for a while...
Learnt about music theory and notes in guitar.
Learnt more about strumming.
Learnt the Come As You Are riff.
Finished with Justin's strumming tips.
Got a little more than half-way through with Justin's strumming tips.
Learnt the C Chord.
Finished the second iteration of Module 4 practice and played 505 and Chocolate Jesus! I'll start Module 5 tomorrow.
Continued with Module 4 practice, nearly done!
Started with the second iteration of Module 4 practice.
Finished the first iteration of Module 4 practice, had fun playing 505 and Chocolate Jesus.
Continued with Module 4 Practice, I'll probably finish with this practice after I do the whole thing twice.
Website is back up and continued with Module 4 practice.
Continued with 505 as the website is still broken.
Sort of freestyled a bit since the website seems to be broken.
Continued with 505, the strumming pattern is hard to master!
Continued with 505.
Started learning 505 by Arctic Monkeys as part of my guitar practice, really nice song.
Learnt the riff to Sunshine Of Your Love by Cream, hoping to learn much more in December.
Learnt about the most common strumming patter in guitar.
Learnt about the metronome in guitar.
Learnt the D Minor chord, really cool chord! Sounds much moodier than the other minor chords I've learnt.
Continued with JustinGuitar and learnt about this odd finger stretching exercise.
Went back to Three Little Birds.
Freestyled for a bit.
Easing back into guitar.
Finishing the whole practice was way too ambitious. I could only get done with the Seven Nation Army riff practice.
Finished with Three Little Birds, hope to finish Module 3 practice tomorrow.
Continued with Three Little Birds, the A to E to D transition is really hard.
Continued with Three Little Birds.
Practiced Three Little Birds by Bob Marley. Beautiful song!
Been some time, and learnt the Seven Nation Army riff.
Learnt about strumming with up strums, and using it after the 2nd beat.
Learnt about up strums.
Aug 10, 2022-present
Trying to create a paper which presents a framework that protects the benefits of open research in AI. Inspired by Toby Shevlane and Allan Dafoe's work as well as Nick Bostrom's work. Currently inactive/paused.
Continued writing the introduction.
Continued writing the introduction.
Added some citations.
Continued writing the introduction.
Continued writing the introduction, will take some more time.
Continued writing the introduction, nearly done (sort of).
Didn't do much writing but that's alright.
Continued writing the introduction.
Continued writing the introduction.
Continued writing the introduction.
Continued with reading.
Continued with reading.
Got started with some reading.
Got started with the paper, will have to finish some reading tomorrow before continuing with the introduction. I hope to finish writing in about 3 months (and then get some feedback).
Mar 15, 2022-present
Trying to learn A.I. by leveraging pre-existing knowledge. Currently paused.
Well, it looks like they've released a new version of the course for this year (looks pretty awesome). I'll be sure to come back to this project after my Coursera courses.
Continued with Lesson 8.
Continued with Lesson 8.
Continued with Lesson 8.
Continued with Lesson 8.
About half way through with Lesson 8.
Continued with Lesson 8.
Continued with Lesson 8.
Got started with the last lesson for the foreseeable future.
"Finished" with the Lesson 5 questionnaire.
Continued with the Lesson 5 questionnaire.
Got started with the Lesson 5 questionnaire.
Finished with the Lesson 5 video, will try to finish the questionnaire by the end of this week.
"Continued" with Lesson 5.
"Continued" with Lesson 5.
Continued with Lesson 5. ~15 minutes left so should finish up tomorrow.
Continued with Lesson 5.
"Continued" with Lesson 5.
Continued with Lesson 5.
Continued with Lesson 5.
Continued with Lesson 5.
Continued with Lesson 5.
Continued with Lesson 5.
Sort of got started with Lesson 5.
"Finished" with the Lesson 4 questionnaire, will start Lesson 5 tomorrow.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Got started with the Lesson 4 questionnaire.
Finished with the Lesson 4 video, will move on to the questionnaire.
Continued with Lesson 4, nearly done. The softmax function is pretty awesome.
Continued with Lesson 4.
Continued with Lesson 4 by revising the notebook.
Continued with Lesson 4.
Continued with Lesson 4 (I definitely want to make SGD from scratch after this lesson as a recap exercise).
"Continued" with Lesson 4 (just ran the cells I hadn't run during the video).
Continued with Lesson 4.
Continued with Lesson 4.
Continued with Lesson 4, I was sort of leaving the notebook aside lol so I got to that.
Continued with Lesson 4.
Got started with Lesson 4.
Finished with the Lesson 3 questionnaire!
Continued with the Lesson 3 questionnaire.
Continued with the Lesson 3 questionnaire. Broadcasting is pretty neat.
Continued with the Lesson 3 questionnaire.
Continued with the Lesson 3 questionnaire.
Continued with the Lesson 3 questionnaire.
Got started with the Lesson 3 questionnaire.
Did some Microsoft admin work related to fast.ai.
Finished with the Lesson 3 video, will start the questionnaire tomorrow.
Continued with Lesson 3.
Continued with Lesson 3. Didn't know that gradient descent originated with Issac Newton.
Continued with Lesson 3.
Continued with Lesson 3.
Continued with Lesson 3.
Continued with Lesson 3. I guess this page counts as blogging?
Continued with Lesson 3.
There were a few questions that I skipped (since I don't think they were discussed in Lesson 2) but other than that I've finished the questionnaire for Lesson 2! Will continue Lesson 3 tomorrow.
Finished the project.
Continued with the Lesson 2 questionnaire and I've nearly finished with the project for Lesson 2 (it's a cloud classifier!)
Continued with the Lesson 2 questionnaire.
Lesson 3 will be on hold as I completely forgot about the questionnaire for Lesson 2! Got started with that.
Continued with Lesson 3.
Continued with Lesson 3, we created a small bear classifier app within the Jupyter Notebook which was awesome. I tried putting in a polar bear (we've only trained our model on grizzly bears, black bears and teddy bears) and I got back a prediction of grizzly bear with ~82% confidence. Hm.
Continued with Lesson 3, the ImageClassiferCleaner GUI is awesomely cool. Jupyter Notebook is darn powerful.
Got started with Lesson 3.
Trained my model with the API key, will start Lesson 3 tomorrow.
Got the API key!
The replacement looks pretty complicated to set-up, so I might have to go through with Microsoft. Finished Lesson 2, will start Lesson 3 after the Microsoft stuff.
Found a replacement for the Bing Search API through the forums.
Continued with Lesson 2. I now need to do admin stuff for the last few sections of Lesson 2 :(
Continued with Lesson 2.
Continued with Lesson 2, I was expecting P values to be this great statistical analysis tool, but nope.
Continued with Lesson 2, Jeremy's example on P values was incredible.
Continued with Lesson 2. Transfer learning is such a neat and efficient use of compute (time and computational resources).
Continued with Lesson 2.
Got started with Lesson 2.
Finished with Lesson 1's questions, will start Lesson 2 tomorrow.
Continued with Lesson 1's questions, almost done!
Finished with the Lesson 1 video and got started with the questions.
Continued with Lesson 1.
Continued with Lesson 1. We had to train a classifier that classified an image as a cat or a dog. I tried putting an image of a tiger and a wolf (which are technically a cat and a dog respectively but not really) and it actually gave true and false for the question "Is this image a cat?" respectively!
Got started with Practical Deep Learning for Coders. Really excited!
May 12, 2023-May 14, 2023
I was a resource head for the Earth and Climate Change Council and a member of the IT team. Won best counci.l
This whole project should be prefaced by the sheer amount of work that had gone into it: from my main work as a resource head for the Earth and Climate Change council: working on the agenda document, the background guide and the video with my co-resource head and directors - as well as helping out with the website as part of the IT team.
With that being said, what an incredible event, so glad to have been (somewhat) randomly selected for ECC - I'd like to think I was a pretty darn good resource head, and won best council with my incredible directors, co-resource head, IT and press members.
Oct 28, 2021-Mar 18, 2023
Trying to finish freeCodeCamp.org's curriculum by the end of 2023.
Happy to call an end to this project - really proud of all the certificates that I've earned and the mini-projects I made for them. As I mentioned in one of my blog posts for 2022, I won't (and have not yet) hesitate to recommend freeCodeCamp to anyone who wishes to learn how to code.
Continued with the Data Analysis with Python course.
"Continued" with the Medical Data Visualizer project.
"Continued" with the Medical Data Visualizer project.
"Continued" with the Medical Data Visualizer project.
Continued with the Medical Data Visualizer project.
Continued with the Medical Data Visualizer project.
"Continued" with the Medical Data Visualizer project.
Continued with the Medical Data Visualizer project.
"Continued" with the Medical Data Visualizer project.
"Got started" with the Medical Data Visualizer project.
Finished the Demographic Data Analyzer Project (here it is).
Continued with the Demographic Data Analyzer project. Figured out the roadblock. I hope to finish the last three remaining certificates by the first half of 2023.
Continued with the Demographic Data Analyzer project. Sort of hit a roadblock, but I'll figure it out (hopefully).
Continued with the Demographic Data Analyzer project.
Got started with the Demographic Data Analyzer project.
Finished with the Mean-Variance-Standard Deviation Calculator project (here it is).
Continued with Data Analysis with Python.
Continued with Data Analysis with Python.
Continued with Data Analysis with Python.
Continued with Data Analysis with Python.
Continued with Data Analysis with Python.
Continued with Data Analysis with Python.
Got started with Data Analysis with Python.
Finished with the Probability Calculator Project project (here it is) and earned my certification for Scientific Computing with Python (yes, I know the budget app project isn't fully finished, but I wanted to move on). Only three more certifications left!
Finished with the Polygon Area Calculator Project project (here it is).
Been a while. Continued with the Budget App Project and I plan to just finish my Python certification before the end of the year (and early next year, try to finish databases).
"Continued" with the Budget App Project.
Continued with the Budget App Project.
"Continued" with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project. Should finish up this upcoming week.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Continued with the Budget App Project.
Got started with the Budget App Project.
1 year since this project started! Finished with the Time Calculator Project, here it is.
Continued with the Time Calculator Project. Writing down my logic really helped, really close now (just need to fix the AM/PM and -12 logic for 24-hour format).
"Continued" with the Time Calculator Project.
Continued with the Time Calculator Project. Need to map out my logic on paper tomorrow to see where I'm going wrong.
Continued with the Time Calculator Project. Getting somewhat close.
Continued with the Time Calculator Project.
Continued with the Time Calculator Project.
Continued with the Time Calculator Project.
Continued with the Time Calculator Project.
Continued with the Time Calculator Project.
Continued with the Time Calculator Project.
Never mind, I won't finish the project today, but I made some great progress! I think I just need to fix the AM/PM and calculate next days.
Continued with the Time Calculator Project. I'll try to finish this project by Oct 17.
Got started with the Time Calculator Project.
Finished with the Arithmetic Formatter project! Here it is.
Continued with the Arithmetic Formatter project. Still can't get the test cases to pass but I think I'm getting close.
Continued with the Arithmetic Formatter project. I can't get my solution to pass the test cases (even though the output looks to be correct) for some reason, will keep trying tomorrow.
Continued with the Arithmetic Formatter project and fixed the alignment of the numbers! Will finish the project tomorrow.
Continued with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project. I'm sort of close to fixing the arrangement.
Continued with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project.
"Continued" with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project.
Got started with Relational Database.
Continued with Responsive Web Design.
Continued (?) with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Progress! I finally got the problems to print horizontally for the Arithmetic Formatter project. Also continued with Responsive Web Design.
"Continued" with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with Responsive Web Design.
Finished with error handling (?) for the Arithmetic Formatter project and continued with Responsive Web Design.
Finished with the Scientific Computing with Python lectures. On to the projects!
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Contunued with Scientific Computing with Python. Nearly done with the videos.
Contunued with Scientific Computing with Python. Never repeat string data more than once.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python. JSON all the way.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python. RFC is a nice easter egg.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python. I think the website went down?
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Got started with Scientific Computing with Python.
Finally, finished with the American/British English Translator project (here it is) and finished with Quality Assurance. Oh, and also continued with Responsive Web Design.
Continued with the translator project (two more test cases left, though I'll be honest and say that I sort of skipped the other two test cases) and with Responsive Web Design.
Continued with the translator project (four more test cases to go) and with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
"Continued" with the translator project and with Responsive Web Design.
Continued with the translator project (though progress has been sort of slow) and with Responsive Web Design.
Continued with the translator project (sort of fixed the RegEx and figured out how to make the text green) and with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with the translator project (sort of finished the British to American English part, on to getting the text green lol) and with Responsive Web Design.
Continued with the translator project (did some VSCode magic to flip the JS objects for the British to American English part) and with Responsive Web Design.
Continued with Responsive Web Design.
Continued with the translator project (I need to figure out the highlight functionality, how do I insert a <span>
element within the Express res
?) and with Responsive Web Design.
Continued with the translator project and with Responsive Web Design.
Continued with the translator project (the American to British English part is very buggy but it sort of works) and with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with the translator project (working on the American to British English part) and with Responsive Web Design.
Sort of got started with the last project for Quality Assurance, American-British English Translator and continued with Responsive Web Design.
Finished with the Sudoku Solver project (here it is) and continued with Responsive Web Design.
One more test case left and continued with Responsive Web Design.
Three more tests cases left and continued with Responsive Web Design.
Four more tests cases left for the Sudoku Solver project! Also continued with Responsive Web Design.
Continued with the Sudoku Solver project (about half way done with all the /api/check
test cases) and with Responsive Web Design.
Continued with the Sudoku Solver project (I've got an annoying glitch for the region placement check) and with Responsive Web Design.
Continued with the Sudoku Solver project and with Responsive Web Design.
Continued with the Sudoku Solver project and with Responsive Web Design.
Continued with the Sudoku Solver project (finished the solve part with this algorithm, which I referred to due to this) and with Responsive Web Design.
Continued with the Sudoku Solver project and with Responsive Web Design.
Continued with the Sudoku Solver project (finished translating the helper function from (1, 2) for the main backtracking function) and continued with Responsive Web Design.
Continued with the Sudoku Solver project (got the regex stuff to work and got started with the solving part) and continued with Responsive Web Design.
Continued with the Sudoku Solver project and continued with beta Responsive Web Design.
Got started with the Sudoku Solver project and finished with a section for beta Responsive Web Design (which recently graduated to the default Responsive Web Design!)
Finished with the Personal Library project by intentionally leaving a test case broken :/ (here it is) Also continued with beta Responsive Web Design.
AAAAAAAAAA This is a really complicated situation: I wrote all the functional tests and a) Replit keeps crashing after all the tests pass (unless I do a weird port trick) b) Even though the POST
comment test case works without the tests, it refuses to pass after all the tests pass. This is probably the second or third most frustrating project I worked on (the most frustrating was probably the JavaScript calculator)
Got the comment POST
test case to pass, on to the GET
test case. Also continued with beta Responsive Web Design.
The comment array seems to be less broken and continued with beta Responsive Web Design.
Got the delete all test case to pass and the comment array is, uh, there? (it's really broken). I also continued with beta responsive web design.
Continued with beta Responsive Web Design but didn't make a ton of progress with the Personal Library project (the comment system looks a bit daunting, I don't think I've worked with arrays in MongoDB before)
Got started with the Personal Library project and continued with beta Responsive Web Design.
Finished the Issue Tracker project (here it is) and continued with beta Responsive Web Design.
DELETE
is done and continued with beta Responsive Web Design.
I now only have the PUT
and DELETE
functionality to program + the tests! Also continued with beta Responsive Web Design.
Got a decent amount of tests cases for the Issue Tracker project (I need to fix a schema glitch for the GET
request) and continued with beta Responsive Web Design.
Continued with the Issue Tracker project and continued with beta Responsive Web Design.
Got started with the Issue Tracker Project and continued with beta Responsive Web Design.
I finally got done with the Metric-Imperial Converter Project (here it is) and continued with beta Responsive Web Design.
AAAAAAAAAA I finished all the tests but freeCodeCamp keeps failing the 16 units test test, it feels like I've tried everything to fixed it.
Finished those last two non-test test cases and continued with beta Responsive Web Design. I don't like how we're (to my knowledge) force to use eval for this project.
Excluding the the two test cases for the test (which I'm dreading lol), I only have two more tests! Also continued with beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Got the "all incoming units..." test to pass and continued with beta Responsive Web Design (which I did for yesterday also, oops).
Got the "invalid unit" test to pass, need to get the "invalid number" and "invalid number and unit" tests to pass.
Got a decent amount of test cases to pass after adding rounding to 5 decimal places and continued with beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Continued with the Metric-Imperial Converter project (got most of the converter to work) and beta Responsive Web Design (I'm only going to do one challenge from now so I don't run out of them lol).
Continued with the Metric-Imperial Converter project and beta Responsive Web Design (also, this is pretty late but the issue I opened on the 4th got resolved).
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Got started with the Metric-Imperial Converter project and continued with beta Responsive Web Design.
Finished all the coding challenges for Advanced Node and Express. I didn't like the chat application part, mainly because the test cases were too lenient and you could pass a lot of them with a non-functional project. Anyways, I also continued with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design (finished a section).
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design. Why did I never discover Passport during the bettermailto project?
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design. Why is CSS grid so complicated?
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design.
Got started with Advanced Node and Express, continued with beta Responsive Web Design and opened an issue on GitHub.
Finished Quality Assurance and Testing with Chai and continued with beta Responsive Web Design! I finally understand what all this Chai business does. Going to start with Advanced Node and Express from tomorrow.
Just realized that I lost my ~180-day streak (probably because of time zones), though it doesn't really matter. Continued with beta Responsive Web Design and Quality Assurance.
Continued with beta Responsive Web Design and Quality Assurance.
Continued with beta Responsive Web Design and Quality Assurance.
Continued with beta Responsive Web Design and Quality Assurance.
Continued with beta Responsive Web Design and got started with Quality Assurance again (as I've forgotten a lot about it and I need that knowledge for my Information Security project)
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Couldn't get much of anything done for the project, but continued with beta Responsive Web Design.
Dang it, I forgot about the tests that I had to write. This project is deceivingly big. Anyways, made a bit of progress on the project and continued with beta Responsive Web Design (also, beta Relational Database looks really cool).
Sort of got multiple stocks to work (the query parameter if-else conditions aren't very good though), I think I can technically submit the project now, but it's obviously not complete (need to implement the like and rel_likes features)
Fixed an axios glitch where it would take two refreshes to get the stock price. Got started with two stocks and continued with beta Responsive Web Design.
Progress on Stock Price Checker has been slow, why is it so hard to make a GET request in node.js?
Continued with the Stock Price Checker and Responsive Web Design.
Got started with the Stock Price Checker project and finished a project within beta Responsive Web Design!
Finally finished with the Python section of Information Security. Definitely my least favourite part of freeCodeCamp so far. Anyways, continued with beta Responsive Web Design and the Information Security projects look fun.
Continued with beta Responsive Web Design. Yeah, I know I've been skimping on Information Security. It'll come soon.
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Finished with the tutorial project and continued with beta Responsive Web Design.
Got started with the tutorial project and continued with beta Responsive Web Design.
Learnt how to create a TCP client and continued with beta Responsive Web Design.
Back to learning, finished with Understanding Sockets and Creating a TCP Server and continued with beta Responsive Web Design.
Haha I did it! Earned my fifth certificate (here's the project) and continued with beta Responsive Web Design.
This forum post should help with my glitch and continued with beta Responsive Web Design.
I think I know why my exercise tracker project's last test case doesn't pass, I can't save multiple exercises! I'll fix that soon and I've continued with beta Responsive Web Design.
The last test case was close to ending me so I opened up a forum post about it and continued with beta Responsive Web Design.
The last test case is so dang annoying but I think I'm nearly done with it. Continued with beta Responsive Web Design.
One more test case left for the project! Also, continued with beta Responsive Web Design.
Made decent progress on the project and continued with beta Responsive Web Design.
My opinion on Mongoose has changed, it's actually pretty neat. Got a little less than half of the test cases done and continued with beta Responsive Web Design.
Got started with the behemoth of a project that is the Exercise Tracker and continued with beta Responsive Web Design.
Finished with the URL Shortener Project (here it is) and finished with a section of beta Responsive Web Design.
Nearly done with the URL Shortener project and continued with beta Responsive Web Design.
Finished with the File Metadata Microservice project (here it is) and continued with beta Responsive Web Design. The last two projects I have might take a bit of time...
Finished with the Request Header Parser Microservice project (just had to find the HTTP request headers, here's my project link on replit) and continued with beta Responsive Web Design.
Finished with the Timestamp project (here it is) and continued with beta Responsive Web Design.
Almost finished with the Timestamp project and my project in beta Responsive Web Design (which I continued with) got reset when the FCC team changed the layout!
Got started with the Timestamp Microservice project and finished with a section in beta Responsive Web Design.
Finished with MongoDB and Mongoose and finished with the challenge portion of Back End Development and APIs! Back to working on projects.
Continued with MongoDB and Mongoose.
Started with MongoDB and Mongoose and finished a project in beta Responsive Web Design.
Finished Basic Node and Express, I think I finally got it down now.
Got started with Basic Node and Express.
Back to learning, got started with Back End Development and APIs and finished with Managing Packages with NPM (you can find all the back-end learning on my replit in the appropriate folder).
I did it! Earned my data visualization certificate (here's the last project) and continued with beta Responsive Web Design.
Well, I figured it out the treemap project thanks to the D3 creator, Mike. Just need to add the legend and the tooltip. Should be done in ~2 days.
Got started with the Treemap project and continue with beta Responsive Web Design.
Map done! Couldn't get the tooltip test cases to pass for some reason, but here it is. I'll work on the last project tomorrow. Also continued with beta Responsive Web Design.
Only 3 more test cases left to pass! Also finished a project in beta Responsive Web Design.
LET'S GO I got the map all coloured in (the colour scheme is a little different, but that's fine), going to try to wrap this up in about 2 days.
Okay, colouring will be impossible if I don't use FCC's map data. Figuring out how to replace the pre-existing map data with that. Also continued with beta Responsive Web Design.
In the process of figuring out how to color in the map. Also continued with beta Responsive Web Design.
Figured out the map! Also continued with beta Responsive Web Design and finished a section within it!
Still figuring out the whole map thing, though I think I found my answer. Also continued with beta Responsive Web Design.
Got started with the map project, wondering if I can use a package to draw the US map instead of converting the data they gave into an SVG (which is too complicated). Also continued with beta Responsive Web Design.
Finished with the heatmap project (here's the link to it)! Will start with the penultimate project tomorrow. Also continued with beta Responsive Web Design.
So close to submitting my heatmap project, just need another day to make the y-axis show the month name, not the number and to add text below the legend (also, figured out the legend!) and I also continued with beta Responsive Web Design.
Got more than half of the test cases to pass, though I still need to figure out how to make a legend. Also continued with beta Responsive Web Design.
Made amazing progress! The heatmap is basically complete, just need to add a legend, fix the tooltip and pass the tests. I also continued with the beta Responsive Web Design.
Made good progress with the heatmap project, I got the axes set properly, it's just the squares that need work now. Also finished two projects within beta Responsive Web Design!
Sort of fixed the data issue with this less obscure website (I say sort of because the free account only has 10000 requests before it goes down, which is decent, but the tests that I run might exhaust that, not entirely sure) and continued with beta Responsive Web Design.
The same issue that came up with the bar chart project has come up again, I can't seem to find a place to store edited data. Since the FCC data is nested, it's really hard to work with, so I "unnested" it and stored it on this obscure website, but the data stored there doesn't seem to be permanent, so now I have to work on both my heatmap project and my bar chart project again.
Oh, I also continued with beta Responsive Web Design.
Made a bit of progress on the heat map and continued with beta Responsive Web Design.
Finished the scatterplot project! Yeah, there are two test cases left, but they have the same issue as the bar chart project. Here's the project. Also got started on the Heat Map project and continued with beta Responsive Web Design.
Didn't have much time today, so I could only continue the beta Responsive Web Design.
Got done with the legend, the only tests I have left relate to the annoying D3 attributes.
Again made great progress, I only have 5 test cases left to pass for my scatterplot project and continued with beta Responsive Web Design.
Made amazing progress, got the whole y-axis done and added the circles for the scatterplot. Just need to get the test cases to pass.
Got the y-axis almost complete and continued with beta Responsive Web Design.
Couldn't continue with my scatterplot (will try to finish it in the weekend) but I continued with beta Responsive Web Design. Someone in an EA Slack channel talked about FCC!
For some reason, it's really complicated to get minute and second formatted time on a y-axis (like this: 31:24), will continue work on it tomorrow. Also continued with beta Responsive Web Design.
Got started with the scatterplot project and continued with beta Responsive Web Design.
Couldn't fix that issue, but that's alright. Submitted my bar chart project! (see it here) and continued beta Responsive Web Design.
Got every test case to pass, except for one... I'll work on that tomorrow and if I can't get it, I'll just submit it. Anyways, I also continued beta Responsive Web Design.
Finished the tooltip, now I just need to pass all the test cases. Also continued the beta Responsive Web Design.
Partially added the logic for a tooltip in my bar chart project and continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Got half of the test cases to pass for my project and continued beta Responsive Web Design.
Now I made some good progress, I decided to use JSON (as it was easier to store on the web) and everything except the tooltips is done.
Wasn't able to make much progress with my bar chart project as I wasted a lot of my time trying to figure out how to host my custom data file, anyways, I continued with beta Responsive Web Design.
Made good progress with my bar chart project (though the x-axis is fully destroyed) and continued with beta Responsive Web Design.
Continued with data visualization and the beta Responsive Web Design.
I'll update the 25 + 5 Clock code if any changes come up, but for now, I've earned my Front End Development Libraries certificate! Will push on with data visualization tomorrow.
Finished the HTML part of beta Responsive Web Design and opened up a forum post about my issues with my project.
Continued with beta Responsive Web Design, still have ~6 test cases left even though I should pass them. This annoying script error bug has been there for almost 2 days.
Continued with beta Responsive Web Design, only 6 more test cases. Also, 100-day streak!
Continued with beta Responsive Web Design and I only have 8 more test cases to pass for my 25 + 5 clock!
Continued with beta Responsive Web Design and sort of made the timer functional, though there is some weird script error.
Continued with beta Responsive Web Design and made a breakthrough with my 25 + 5 project, I figured out that there should be two states for seconds, one for math and another to be displayed. Hopefully, I'll get this project complete and earn my certificate by the end of this week!
Continued with the beta version of Responsive Web Design and my 25 + 5 Clock project. Hope to get almost fully through FCC in 2022!
These front-end projects take so, so long. And if you take a few days to build them, your streak gets wrecked. So I was desperate, I was so tired from my 25 + 5 Clock project that I started to do my data visualization projects, thinking they would be faster to do than the front-end projects (they weren't).
But then, just as I was about to give up, I saw... this. This not only saved my streak for today, but my streak for years to come as I can speedrun this on the side and finish my projects without melting my brain by trying to do it all in one day.
Thank you, whoever thought of this. (Side note: This is actually a cool idea on its own, I really dig the new design on these challenges.)
Finished the JavaScript Calculator project (see it here)
Finished the Markdown Previewer project and the Drum Machine project (see it here), only two more projects left till I earn my certification!
Finished Random Quote Machine project and partially completed the Markdown Previewer project (see it here).
Sigh, I spent almost 2 hours just to end up with a half baked Random Quote Machine submission. I'll work on it tomorrow.
Finished the JavaScript part of the curriculum.
Completed Cash Register and earned my certification!
Completed Roman Numeral Converter.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Started with Random Quote Machine and continued with the JavaScript questions I left.
Finished React and Redux.
Continued with the JavaScript questions I left and completed the projects Caesar Cipher and Telephone Number Validator.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left, it's nice to see my LeetCode practicing paying off (kinda).
Continuing with the JavaScript questions I left, hope to earn my JavaScript certification soon!
Finished Redux.
Completed my last responsive web design project and earned my certification!
Going to take some time out to finish my pending projects, won't look good on my heat map, but oh well. Finished my Technical Documentation project (here's the project).
Continued with Quality Assurance.
Continued with Quality Assurance and JavaScript.
My PR got accepted! Also started with Quality Assurance.
Continued with Information Security and unfinished challenges. Also opened up a PR to fix a grammar issue in Information Security.
Continued with Information Security and finished off some challenges I left previously.
Finished JSON APIs and AJAX and started with Information Security, this stuff is incredibly useful! I wish I learnt about Helmet.js earlier.
Finished with D3 and nearly finished JSON APIs and AJAX.
Continued with D3 and held a perfect streak for the whole month!
Continued with D3.
Finished my kanyewest.com's Donda Stem Player re-creation and continued with D3.
Continued with Redux and started with React with Redux and Data Visualization with D3 just to get my points up. I hate how the difficulty skyrockets after Responsive Web Design. At least I had fun re-creating kanyewest.com's Donda Stem Player for my Responsive Web Design Project.
Continued with Redux.
Finished with React and started with Redux.
Continued with React.
Continued with React.
Continued with React.
Continued with React.
Started with React.
Finished with SASS, thinking of using it in my bettermailto project)!
Finished jQuery and moved on to SASS.
Continued with jQuery.
Finished Bootstrap and moved on to jQuery.
Continued with Bootstrap.
Continued with Bootstrap.
Continued with Algorithms and Functional Programming in JS and Bootstrap.
Continued with Basic Data Structures in JS.
Started Basic Data Structures in JS.
JS is so frustrating sometimes.
Finished OOP in JS.
Continued with OOP in JS, pretty cool stuff!
Much shorter this time around, continued with OOP (object-oriented programming) in JS.
Why did this take so long? Continued with JS.
I got done with the Counting Cards problem in JS. I also continued with ES6.
Continued with Regular Expressions and finished Debugging.
Continued with Regular Expressions.
Continued with ES6 and Regular Expressions.
Continued with Basic JavaScript and started ES6. I really need to continue with my Web Design projects and finish the JS curriculum items I skipped.
Continued Basic JavaScript.
Continued Basic JavaScript and Regular Expressions.
Continued Basic JavaScript and Regular Expressions, the issue was closed as it was an intentional feature.
Continued Basic JavaScript and Debugging, and also opened up an issue about possible duplication.
Mar 04, 2023-Mar 04, 2023 Attended a national maths competition with my schoolmate. Due to privacy reasons, I was being incredibly vague.
Attended the first (and last) day of a national maths competition with my schoolmate as a duo. First round went really well (mostly because it was easy + 60 minutes) and got ~7th place, however the second round was extremely hard (and 45 minutes!) so we did not reach top 3. Oh well, the ride to the university + the conversations with him were what mattered the most. Great food though!
Oct 05, 2022-Feb 14, 2023 I was the Coordinator - Environment for my school. A post that I will cherish having for a long time (oh, and due to privacy reasons, I was being incredibly vague).
Well, for some reason or the other, I did not decide to log one of the most important projects of my life so far. I became part of the student council, being unsure of what to expect - the uncertainty was amplified by me getting my second preference (though I'm grateful that happened instead of my first preference)
I ended up making the post a lot more influential than it should have been. It's the postholder and not the post. I ended up organising and contributing extensively to a lot of things, small and big (from our national day celebration to our seniors' graduation day to a small impromptu assembly we had when a workshop was being conducted for teachers).
The student council in your junior year should (hopefully!) just be a taste of what's to come next year. But that shouldn't stop you from reminiscing.
Feb 03, 2023-Feb 05, 2023
Attended my last MUN, ADMUN 2.3 as part of my school team. Due to privacy reasons, I was being incredibly vague.
Apr 14, 2022-Jan 30, 2023
Tried to learn more about computer science (mainly), mathematics and science with Brilliant + tried to complete the daily challenges.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Continued with Cryptocurrency.
Got started with Cryptocurrency.
Finished with Introduction to Neural Networks.
Continued with Universal Approximator.
Continued with Universal Approximator.
Continued with Universal Approximator.
Continued with Universal Approximator.
Finished with Curve Fitting and got started with Universal Approximator. I hope to make as much progress as I can before April 2023.
Continued with Curve Fitting.
Continued with Curve Fitting.
Continued with Curve Fitting.
Got started with Curve Fitting.
Finished with Hidden Layers.
Continued with Hidden Layers.
Continued with Hidden Layers.
Continued with Hidden Layers.
Got started with Hidden Layers.
Finished with Training a Single Neuron.
Finished with the searching algorithms in Data Structures (as the whole course is retiring today).
Continued with Training a Single Neuron.
Continued with Training a Single Neuron.
Continued with Training a Single Neuron.
I come back after about a month and everything has changed lol. Continued with Training a Single Neuron (?).
"Continued" with Sigmoid Neuron.
Continued with Sigmoid Neuron.
Got started with Sigmoid Neuron.
Finished with Classification.
Continued with Classification.
Got started with Classification.
Finished with Building an XOR Gate.
Got started with Building an XOR Gate.
Finished with Decision Boundaries.
Continued with Decision Boundaries.
Got started with Decision Boundaries.
Finished with Activation Arithmetic.
Continued with Activation Arithmetic.
Continued with Activation Arithmetic.
Continued with Activation Arithmetic.
Continued with Activation Arithmetic.
Got started with Activation Arithmetic.
Finished with The Decision Box.
Got started with The Decision Box.
Finished with Can Computers Learn?
Continued with Can Computers Learn?
Got started with Can Computers Learn?.
Finished with The Folly of Computer Programming.
Finished with The Computer Vision Problem and got started and continued with The Folly of Computer Programming.
Got started with The Computer Vision Problem.
Finished with The Computer Vision Problem.
Finished with Neural Networks.
Continued with Neural Networks.
Got started with Neural Networks
Finished with Building Programs and finished with Algorithm Fundamentals!
Continued with Building Programs.
Continued with Building Programs.
Got started (?) with Building Programs.
Finished with Spellcheck. Today's daily challenge is literally a 5x5 KENKEN!
Continued with Spellcheck.
Got started with Spellcheck
Finished with Who Benefits?
Got started with Who Benefits?
Finished with Variants.
Continued with Variants.
Continued with Variants.
Got started with Variants.
Finished with Running Time.
Continued with Running Time.
Continued with Running Time.
Continued with Running Time.
Continued with Running Time.
Continued with Running Time.
Got started with Running Time.
Finsihed with Termination.
Continued with Termination.
Continued with Termination.
Continued with Termination.
Continued with Termination.
Got started with Termination.
Finished with Correctness.
Continued with Correctness.
Continued with Correctness.
Continued with Correctness.
Continued with Correctness.
Continued with Correctness.
Got started with Correctness.
Finished with Deferred Acceptance Algorithm.
Continued with Deferred Acceptance Algorithm.
Got started with Deferred Acceptance Algorithm
Finished with Using Greediness.
Continued with Using Greediness.
Got started with Using Greediness.
Finished with The Stable Matching Problem.
Continued with The Stable Matching Problem.
Continued with The Stable Matching Problem.
Got started with The Stable Matching Problem.
Finished with The Mathematics of Big O.
Continued with The Mathematics of Big O.
Got started with The Mathematics of Big O.
Finished with Understanding Big O.
Got started with Understanding Big O.
Got started with Understanding Big O.
Finished Comparing Algorithms.
Finished with Best, Worst and Average Case.
Continued with Best, Worst and Average Case.
Continued with Best, Worst and Average Case.
Got started with Best, Worst and Average Case
Finished Counting Operations.
Finished Timing Programs with a Stopwatch
Finished with Insertion Sort.
Finished with Sorting an Array.
Continued with Sorting an Array.
Continued with Sorting an Array.
Got started with Sorting an Array.
Finished with Binary Search.
Continued with Binary Search.
Continued with Binary Search.
Got started with Binary Search (again).
Finished with Searching an Array.
Continued with Searching an Array.
Continued with Searching an Array.
Got started with Searching an Array.
Finished with Arrays.
Continued with Arrays.
Got started with Arrays.
Finished with Algorithms and Implementations and Computer Science Fundamentals.
Continued with Algorithms and Implementations.
Continued with Algorithms and Implementations.
Got started with Algorithms and Implementations.
Finished with Graph Search.
Continued with Graph Search.
Got started with Graph Search.
Finished with Representing Games & Puzzles.
Continued with Representing Games & Puzzles.
Continued with Representing Games & Puzzles.
Continued with Representing Games & Puzzles.
Got started with Representing Games & Puzzles.
Finished with Thinking with Graphs.
Continued with Thinking with Graphs. The four colour theorem was explored in today's daily challenge.
Finished with Divide and Conquer and got started with Thinking with Graphs
Continued with Divide and Conquer.
Continued with Divide and Conquer.
Got started with Divide and Conquer.
Finished with Binary Search.
Finished with Interfaces (though I have to write the notes for it) and got started with Binary Search.
Finished with Abstraction and got started with Interfaces.
Continued with Abstraction.
Got started with Abstraction. I'm now going to only mention daily problems if they're interesting/difficult.
Finished with the daily problem and finished with Naming.
Finished with the daily problem and continued with Naming.
Finished Spots and Stripes (got it correct) and continued with Naming.
Finished the daily problem and continued with Naming.
Finished Round the Clock (got it correct, though it doesn't really count) and got started with Naming.
Finished Which is Which? (got it correct) and finished with Order and Search (finally!).
Finished Hurry to the Honey (got it wrong) and continued with Order and Search.
Finished Triangles in Line (got it correct) and continued with Order and Search.
Finished Stop the Car! (got it correct) and continued with Order and Search.
Finished Whose Slope? (got it correct) and continued with Order and Search.
Finished two daily problems and Wrangling with Repetition.
Finished Coins in Boxes (got it wrong) and got started with Wrangling with Repetition.
Finished Carrrs, One More Girl and Ice Cream Dilemma (all correct except the first one)
Finished Tracing Completely, Make It Traceable and Encircled, all of which I got correct.
Finished Bookworms (got it correct) and finished with Matrices for Neural Networks.
Finished Impossible Result (got it correct) and got started with Matrices for Neural Networks.
Finished the daily problem and finished Vectors for Neural Networks.
Finished How Many Elephants? (got it correct) and got started with a brush-up on linear algebra.
Finished two daily problems and with Recurrent Neural Networks.
Finished In the Cards (got it correct) and continued with Recurrent Neural Networks.
Finished The Heaviest Ornament (got it correct) and got started with Recurrent Neural Networks.
Finished Different Numbers (got it correct) and finished with Arrays.
Finished the daily problem and got started with Arrays.
Finished Whose Two? (got it wrong) and finished with Treaps (got every question for Treaps correct!)
Finished Honeycomb Colors (got it correct) and finished with Binary Heaps.
Finished Stack of Circles (got it correct, really proud of this) and got started with Binary Heaps.
Finished Same or Different (got it wrong) and finished with Priority Queues. I got literally everything wrong for Brilliant today lol.
Finished Make Six Twice (got it correct) and got started with Priority Queues.
Finished Connected Gears (got it correct) and finished with Red Black Trees.
Finished Seeking Chocolate (got it wrong, I got the other ant's path completely wrong lol), finished with Tree Rotations and got started with Red Black Trees.
Finished Comparing Heights (got it wrong) and got started with Tree Rotations.
Finished the daily problem and finished with queues.
Finished Off Balance (got it correct) and got started with Queues.
Finished Class Sizes (got it wrong) and finished with Stacks.
Finished You Won't Get This Number (got it correct) and got started with Stacks.
Finished Compare the Weights (got it correct) and finished with Binary Search Trees.
Finished Corner to Corner (got it correct) and got started with Binary Search Trees.
Finished All Roads Lead to Nika (got it correct, though I basically guessed lol) and finished with Traversals (cool stuff!)
Finished with The Smallest Z (got it wrong) and got started with Traversals.
Finished with The Heavier Side (got it wrong) and finished with Binary Trees, which I found pretty fun.
Finished with Not Bright Enough (got it correct) and finished with Linked Lists (which I now finally understand for LeetCode!)
Finished the daily problem and finished with Divide and Conquer.
Finished Blue or Yellow? (got it correct) and continued with Order and Search.
Finished Human or Werewolf? (got it wrong), finished with Resource Tradeoffs and got started with Order and Search!
Finished Hexagon to Star (got it correct) and continued with Resource Tradeoffs.
Finished Follow the Arrows (got it wrong) and got started with Resource Tradeoffs.
Finished One to Three, Three to One (got it correct) and finished with Parallelism.
Finished Pizza Thief (got it correct) and continued with Parallelism.
Finished Is It Balanced? (got it correct) and got started with Parallelism (note to self: "embarrassingly parallel" is a real term!)
Finished with Repetition.
Finished Doctor Brilliantstein (got it right) and finished with Manipulating Numbers and got started with Repetition.
Finished Don't Go Breaking My Bike (got it right) and continued with Manipulating Numbers.
Finished Oh, the Weather Outside Is Frightful (got it wrong) and continued with Manipulating Numbers.
Finished And They Were Roommates (got it correct) and got started with Manipulating Numbers.
Finished the daily challenge (got it correct) and finished with Conditional Algorithms.
Finished How Many Circles? (got it correct) and continued with Conditional Algorithms.
Finished Made to Measure (got it correct) and continued with Conditional Algorithms.
Finished Pizza Burn (got it correct) and got started with Conditional Algorithms.
Finished Find the Angle (got it correct) and finished Pseudocode.
Finished with El the Elephant (got it wrong) and Searching for Solutions.
Finished with Which Is Shaded More? (got it correct) and got started with Searching for Solutions.
Finished with Writing Programs and Which Is Bigger? (got it correct).
Finished the daily challenge (Playing with Matchsticks, got it wrong) and finished the backlog of problems available on the free tier (Who Won The Race? (wrong), The Nine Nine Plus (correct, used my KENKEN skills), How Much Can They See? (correct), Pasta, Pronto (wrong), Cool, Cooler, Coolest (wrong) and finally, Find the Pattern (correct)).
Got started with Computer Science Essentials and finished Making Decisions. Still on Writing Programs.
Jan 13, 2023-Jan 24, 2023
I was part of the organising team for a middle school computer science event. Tried my best to make this as successful as possible. Due to privacy reasons, I was being incredibly vague.
Event was a success! Everything ran (mostly) smoothly, I got to teach Python for about an hour (showed me how tiring but rewarding teaching is) and had a really nice sit-down chat towards the end of the second day.
Presented the team randomizer.
Attended meetings and worked on the team randomizer.
Attended meeting and worked on the team randomizer.
Worked on team randomizer and documents.
Discussed about documents.
Worked on some documents.
Attended a meeting and worked on some documents.
Finished the team randomizer for the most part.
Attended a meeting and worked on the team randomizer.
Dec 01, 2022-Jan 16, 2023
Trying to Currently running an advent of code for my school's Python club. Due to privacy reasons, I'm being incredibly vague.
Posted the result post!
Twenty-fifth and final problem is up. Really like this one as it's Christmas themed (Merry Christmas by the way!), will send out the results soon.
Twenty-fourth problem is up.
Twenty-third problem is up.
Twenty-second problem is up.
Twenty-first problem is up.
Twentieth problem is up.
Nineteenth problem is up.
Eighteenth problem is up.
Seventeenth problem is up.
Sixteenth problem is up.
Fifteenth problem is up. Really like this one.
Fourteenth problem is up.
Thirteenth problem is up.
Twelfth problem is up.
Eleventh problem is up.
Tenth problem is up. Really like this one.
Ninth problem is up.
Eighth problem is up.
Seventh problem is up.
Sixth problem is up.
Fifth problem is up.
Fourth problem is up.
Third problem is up.
Second problem is up.
First problem is up! Hope to get some responses soon.
Dec 21, 2022-Dec 22, 2022
Created my brother's current (?) website in the span of ~2 days.
Finished the second (and final) version of my brother's website.
Finished the first version of my brother's website.
Jul 04, 2022-Dec 19, 2022
Trying to learn the fundamental concepts of machine learning.
Finished with Week 6 and hence fully finished with this course! I had earned my certificate much earlier (since I believe the last two weeks are optional) but happy to have gained such a deep understanding of the key concepts behind ML.
Continued with Week 6.
"Continued" with Week 6.
Continued with Week 6.
Continued with Week 6.
"Continued" with Week 6.
"Continued" with Week 6.
Continued with Week 6 and got 100% on the practice quiz.
Got started with Week 6, the last week.
Finished with Week 5.
Continued with Week 5.
Continued with Week 5.
Continued with Week 5.
Continued with Week 5.
Continued with Week 5.
"Continued" with Week 5.
Continued with Week 5.
Continued with Week 5.
Continued with Week 5.
Continued with Week 5.
Finished with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4 and finished the video.
Continued with Week 4. Still on the same video.
Continued with Week 4 (though I did not finish a full video).
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4 and got 100% on the practice quiz!
Continued with Week 4.
Continued with Week 4 and learnt about Word2Vec.
Got started with Week 4.
Could not finish the final assignment for Week 3 but on to Week 4 anyways (the assignment is technically optional).
Continued with the final assignment for Week 3.
Continued with the final assignment for Week 3 (went throught the pre-requisite notebook).
Got started with the final assignment for Week 3.
Continued with Week 3, nearly done.
Continued with Week 3.
"Continued" with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3 and got 100% on the practice quiz.
Continued with Week 3 and learnt about the convolution operator.
Got started with Week 3.
Finished with Week 2.
Nearly done with Week 2 (#3). Machine learning is awesome once you understand almost everything.
Nearly done with Week 2 (#2).
Nearly done with Week 2.
Continued with Week 2 and learnt about early stopping with stochastic gradient descent.
Continued with Week 2 and learnt about stochastic gradient descent.
Continued with Week 2 and learnt about gradient descent.
Continued with Week 2 and learnt about overfitting and validation/test data sets.
Got started with Week 2 with cross-entropy loss.
Finished with Week 1.
Got 100% on the Week 1 Comprehensive and nearly done with Week 1.
About half-way through with the maths behind the CNN and how it works on real-life images.
Finished learning about the architecture of a Convolutional Neural Network.
Finished with the Multilayer Perceptron section for week 1. These deadlines are wack, y'all.
Learnt about bias-variance trade off and got 100% on the practice quiz.
Learnt about deep and transfer learning.
Finished with multilayer perceptron and could have got 100% on the quiz if I hadn't forgotten to select an answer...
Finished with logistic regression and got 100% on the quiz!
Learnt about logistic regression and a binary MNIST example.
Got started with the course!
Dec 12, 2022-Dec 15, 2022
Attending a winter computing camp. Due to privacy reasons, I'm being incredibly vague.
Third day done! Learnt about Thunkable and showed some humility when it came time to program for the Internet of Things session.
Second day done! Revised the basics of Python.
First day done! Learnt about computer networking from a really nice professor. Also, got a great tour of the university.
Nov 19, 2022-Nov 19, 2022
Led my senior team to a win in a "state" hackathon! Due to privacy reasons, I was being incredibly vague.
Nov 04, 2022-Nov 06, 2022
Attended GFSMUN 2022 as part of my school team. Due to privacy reasons, I was being incredibly vague.
Third (and best) day completed! Our bloc's resolution paper got passed, I became the President of Portugal and Cristiano Ronaldo at the same time during crisis (?, also SIUUU) and won honorable mention for my committee.
Second day completed! Resolution paper, resolution paper.
First day completed! I gave some pretty good POIs as the Delegate of Portugal, I think?
Oct 28, 2021-Oct 21, 2022
Tried my best to get better every day at the four events I practice, which are 3x3, 2x2, 3x3 OH and Skewb, all AO5's were presented in that order and I usually wrote about any PB I get. In addition to regular-ish practice, I attended a local WCA competition.
After 1700 solves, I'm happy to call this project done. I'm not exaggerating when I say that cubing was a big part of my life, but we all have to move on eventually. Maybe I'll revisit this project when another competition comes up :) 22.876, 5.486, 38.588 and 11.233.
22.401, 6.565, 39.651 and 10.100.
20.470, 6.691, 33.614 and 9.103.
19.862, 5.857, 37.010 and 9.527.
21.559, 6.203, 37.976 and 8.565.
20.414, 5.919, 31.688 and 10.009.
17.612, 6.383, 37.462 and 13.477.
23.083, 6.700, 38.384 and 11.140.
20.640, 6.756, 37.880 and 10.302.
20.694, 5.273, 33.634 and 10.598.
19.856, 6.133, 34.889 and 10.218.
20.732, 5.907, 31.214 and 9.320.
20.185, 6.254, 33.995 and 8.724.
19.371, 6.298, 36.396 and 10.548.
21.429, 4.964, 33.788 and 9.876.
19.271, 8.802, 39.664 and 8.347.
23.091, 4.472, 31.189 and 8.808.
19.662, 6.125, 33.877 and 9.205.
20.691, 5.050, 36.578 and 8.841.
20.912, 6.815, 31.041 and 7.615.
\(40^2\) solves! 17.936, 5.969, 35.427 and 7.331.
19.509, 6.107, 34.105 and 9.909.
17.647, 6.375, 35.562 and 9.129.
17.873, 4.861, 31.998 and 11.427.
Attended Dubai Summer Open 2022 and got an 18.73 average with a 16.72 best for 3x3! An awesome time overall :)
19.907, 5.470, 33.116 and 8.903.
18.685, 6.439, 34.472 and 8.268.
19.688, 5.658, 36.235 and 9.067.
Finally! 18.722, 5.123, 29.672 (!) and 8.081.
I think I've learnt the Ja perm for 3x3 OH? 20.030, 5.016, 37.032 and 9.073.
3x3 AO5 PB! (by a couple milliseconds lol): 15.708 (!), 8.368, 35.560 and 7.586
20.416, 5.227, 37.444 and 8.829.
17.806, 6.660, 39.445 and 9.953.
23.468, 5.389, 35.004 and 8.526.
17.652, 5.143, 36.598 and 9.815.
Much better in the Skewb department! 19.732, 6.789, 36.512 and 8.764.
21.091, 6.134, 33.164 and 15.323.
19.941, 6.571, 31.480 and 10.170.
19.545, 5.173, 37.692 and 9.840.
At least I learnt the one-handed version of the H perm! 18.599, 4.864, 38.965 and 11.771.
20.353, 5.457, 39.861 and 11.311.
19.965, 5.536, 35.159 and 9.446.
21.405, 7.053, 38.565 and 10.841.
17.039, 5.987, 35.190 and 7.532.
18.963, 5.775, 33.103 and 8.023.
Finally! 18.730, 4.942, 29.052 (!), 10.617.
21.554, 5.782, 40.320 and 7.502.
So close: 19.009, 4.656 (!), 30.284 and 8.706.
Not a bad way to start the month: 16.993 (!), 6.440, 31.554 and 8.598.
17.234 (!), 5.124, 33.030 and 7.851.
17.595 (!), 5.320, 30.445 and 8.606.
19.340, 5.681, 31.071 and 9.370.
20.071, 4.838 (!), 38.269 and 7.523.
19.091, 5.953, 33.187 and 8.106.
24.022, 5.022, 37.679 and 7.321.
18.195, 4.872, 32.165 and 8.967.
21.094, 6.753, 39.731 and 11.056.
21.094, 6.753, 39.731 and 11.056.
3x3 AO5 PB! 15.888, 5.587, 37.371 and 9.911.
18.596, 5.965, 31.537 and 12.055.
21.247, 5.597, 31.273 and 8.574.
18.867, 6.451, 40.823 :(, 12.007.
19.059, 5.604, 38.726 and 9.577.
22.948, 6.385, 35.875 and 10.078.
19.592, 5.732, 34.364 and 10.530.
18.545, 6.365, 38.177 and 9.836.
One day, I'll get a sub-30 3x3 OH AO5: 17.311, 5.320, 30.854 and 10.231
23.714, 7.466, 31.628 and 10.917.
21.920, 6.766, 39.072 and 8.685.
18.965, 5.504, 33.788 and 10.432.
2 fast 4 u: 19.586, 5.419, 32.351 and 7.546
19.177, 5.797, 40.185 :(, 10.573
18.756, 5.942, 32.829 and 7.772
21.407, 5.065, 38.805 and 10.481
I was so close to sub-30 for 3x3 OH: 17.317 (!), 5.798, 31.982 and 8.910
18.892, 6.250, 32.603 and 8.918.
17.980 (!), 6.040, 31.132 and 10.525.
18.859, 5.639, 33.667 and 10.999.
20.970, 6.555, 35.080 and 10.976.
18.986, 5.383, 33.141 and 8.954.
20.229, 5.544, 33.882 and (8.615, 8.983).
20.432, 5.903, 36.015 and 11.585.
I was so close to a sub-30 3x3 OH AO5... 18.736, 6.921, 30.004 (!) and 11.585.
3x3 was tragic today, my new cube is very fast, and that can result in sub-15, but it can also result in a 40 due to messing up the PLL: 23.590, 6.047, 33.841 and 8.036
20.229, 5.503, 33.131 and 8.247
New cube! 19.169, 6.500, 33.325 and 8.948.
Never mind: 22.696, 5.413, 37.745 and 8.947.
Phew... 18.819, 6.577, 37.075 and 8.134.
22.004, 5.656, 41.466 and 9.496.
20.320, 5.291, 42.044 and 9.445.
I was so close to messing up 3x3 OH lol: 17.735, 6.390, 39.546 and 9.634.
20.155, 5.422, 36.218 and 10.212.
After a certain time in the day, I just cannot cube: 23.168, 4.714, 42.344 and 7.879.
It's funny how a couple of years ago, I would be screaming and running around if I got a sub-15 solve. Now, nothing: 18.392, 5.922, 33.850 and 9.239.
Better: 17.511, 6.151, 34.061 and 9.249
Still pretty meh, but getting better: 19.618, 6.651, 35.002 and 10.860.
20.986, 6.248, 42.098 and 10.130.
22.117, 5.633, 35.752 and 7.100.
20.241, 5.700, 37.880 and 9.941.
A (less?) agreeable set of averages: 18.711, 5.089, DNF and 7.919.
An agreeable set of averages: 19.217, 4.966, 36.632 and 8.640.
Still waiting for 3x3 BLD... 19.928, 7.067, 40.553 and 11.262.
I decided to do two AO5's for every event except 3x3 (to make everything line up): 19.273, (7.272, 5.501), (36.156, 36.921) and (11.751, 9.392)
20.927, 6.204, 37.392 and 9.882
24.275, 5.165, 35.743 and 7.170.
Not bad: 18.764, 4.901, 35.034 and 10.136.
3x3 OH wasn't feeling it today: 18.478, 4.489, 44.487 and 9.555.
23.289, 6.478, 34.936 and 8.654.
Double sigh, my first 3x3 AO5 was a DNF so I did it again and I still can't get a successful 3x3 BLD attempt: (DNF, 20.710), 5.385, 31.499 and 10.485.
Sigh, 3x3 BLD has gotten worse: 19.207, 6.058, 38.293 and 9.943.
I was planning to do a 3x3 BLD attempt, but I had to reassemble my Skewb in the middle of my AO5 :/ 19.659, 5.010, 34.842 and 11.210.
20.562, 5.151, 35.957 and 10.113.
21.166, 5.224, 37.286 and 7.112.
Still no luck with 3x3 BLD: 18.350, 4.698, 35.431 and 6.450 (!)
Phew... 19.904, 4.736, 34.368 and 9.121.
20.574, 5.218, 38.933 and 10.418.
Just made it through: 19.738, 5.281, 39.569 and 9.758.
Again, 3x3 OH could have gone better: 17.624 (!), 5.262, 38.848 and 7.606.
3x3 OH could have gone better: 18.981, 4.761 (!), 38.214 and 8.138.
Finally! 18.702, 7.092, 37.922 and 8.573.
3x3 PB! (10.105) and I still didn't get sub-20 lol: 20.031, 8.630, 31.412 and 7.408.
20.338, 5.874, 34.788 and 11.512.
22.294, 6.656, 36.895 and 9.396.
Great averages, nothing much to complain about: 17.248 (!), 5.251, 35.677 and 8.010.
3x3 OH PB! (22.095): 21.411, 6.433, 35.329 and 9.273.
Been having a hard time getting a successful no-write 3x3 BLD attempt: 18.134, 4.266, 33.915 and 8.322.
Finally: 19.299, 6.022, 32.160 and 8.944.
Today was not a day for 3x3 OH: 19.471, 4.737 (!), 43.997 and 8.170.
21.400, 5.229, 37.052 and 9.670.
3x3 BLD attempt was disastrous today lol: 18.137, 4.741 (!), 38.289 and 11.163.
22.173, 6.177, 32.371 and 14.443.
22.468, 5.526, 36.977 and 7.229.
21.620, 5.126, 38.562 and 11.681.
21.063, 6.582, 31.209 and 10.659.
Finally, some good averages: 17.740 (!), 5.741, 34.197 and 9.334.
3 days in a row... 20.832, 4.844, 35.143 and 9.095.
20.412, 8.698, 41.073 and 8.761.
22.307, 5.259, 35.524 and 10.037.
Today's 3x3 BLD attempt was so bad haha: 19.357, 4.800 (!), 33.606 and 6.465 (!)
21.066, 7.844, 42.862 and 9.970.
Disappointingly, cstimer (the cubing timer I use) doesn't produce AO1000, so here is the mean for 1000 solves: 21.177, 6.102, 41.186 and 10.019. As for the AO5's: 18.469, 5.554, 33.303 and 10.887. Also, I've spent almost 6 hours in total on 3x3 lol, here's to another 1000!
21.078, 6.095, 35.065 and 8.574.
I finished the BLD attempt too early and forgot to execute the moves to solve the last corner :( Also, day after tomorrow will be the AO1000 day! 19.973, 5.549, 37.311 and 7.746.
3x3 OH... 17.459 (!), 5.334, 40.854 and 7.839.
TS UP VE CX EA LQ! I got a successful 3x3 BLD solve without writing down the memorization during the solve! 18.899, 6.497, 37.569 and 10.569 (I also forgot to mention that a couple days ago I got a 3x3 OH PB lol, 22.402)
19.546, 5.346, 39.616 and 10.359.
21.161, 5.131, 36.236 and 9.728.
I was pretty close with the no-writing BLD attempt! 19.845, 5.578, 32.999 and 9.502.
Decent I guess: 19.625, 6.814, 38.264 and 11.757. I also tried to do a BLD attempt without writing down the memorization, I messed up because of execution lol.
Nothing saves the day: 20.620, 5.907, 39.393 and 8.049.
3x3 OH saves the day: 20.796, 4.305 (!), 29.552 (!) and 9.895.
Slightly better: 18.447, 4.443 (!), 39.591 and 7.931.
Barely passable: 19.618, 6.006, 36.972 and 8.722.
Never mind? 17.598 (!), 5.175, 33.667 an 10.520. I hate how turbulent my times are. I guess that's cubing in a nutshell.
Welp, I think we'll be in this time slump for a bit. At least I got a successful 3x3 BLD solve: 20.569, 6.222, 39.119 and 9.908 (Also, I think the change in solving order didn't do much, so I'm back to the original order).
22.961, 5.759, 35.432 and 11.559.
Phew, back on track: 19.187, 5.778, 36.826 and 7.655 (by the way, the order of the averages written haven't changed, but I now do Skewb -> 2x2 -> 3x3 OH -> 3x3).
Well, it was fun while it lasted: 21.856, 6.137, 37.501 and 10.732.
Very nice (except for 3x3 OH): 17.276, 5.472, 37.693 and 8.917. I wonder how long it'll take me to get sub-15 on 3x3.
Nice: 17.101, 5.581, 35.501 and 8.881.
100 more solves to go till AO1000! 18.073, 5.867, 38.429 and 8.191.
3x3 OH AO5 was terrible: 18.068, 5.591, 40.613 and 9.809.
Another successful 3x3 BLD solve! 17.372 (!), 5.924, 35.729 and 10.559.
Today is the greatest day of my life (cubing-wise!), got 3 sub-30 solves in 3x3 OH and great averages all around: 18.990, 5.906, 30.921 (!), 8.003.
And... I got another successful 3x3 BLD solve! It was so hectic lol, I changed my memorization mid-way through the edges (thankfully) .
I haven't been able to get a 3x3 BLD attempt (let alone a successful one) in the past 3-ish days. At least the averages are back to normal (for like a day): 18.529, 5.019, 37.587 and 9.230.
Never mind: 22.649, 5.509, 39.351 and 9.716. I like how my whole day (cubing-wise) gets ruined if my 3x3 AO5 is not sub-20 lol.
Back to normal: 19.452, 5.065, 32.064 and 9.556.
3x3 BLD attempt was off by 3 edges again: 20.618, 5.458, 40.515 and 11.240.
22.546, 7.092, 38.206 and 11.234.
Today's 3x3 BLD attempts were so frustrating, the first one was off by two flipped edges and I kept messing up the execution in the later solves, at least the averages were good: 18.488, 5.382, 39.277 and 8.365.
I got two sub-20 solves for 3x3 at first, but it all got ruined by a DNF and a +2, it sometimes feel like it's all about luck, anyways: 20.698, 5.174, 35.456 and 13.105.
Odd 3x3 BLD attempt was so close: 21.064, 5.506, 37.986 and 8.045.
How did an average with a 40 and a DNF become sub-40? 25.537, 4.964, 39.721 and 9.783.
Scrambles were very easy: 17.547 (!), 4.941, 38.425 and 11.764.
Got a 12 second solve for 3x3 but regardless: 21.821, 6.535, 36.357 and 10.273.
23.077, 5.853, 41.374 and 10.033.
21.405, 6.002, 37.289 and 10.459.
I guess I got lucky? 18.841, 5.380, 34.834 and 9.340. Today's 3x3 BLD attempt was so close (two edges flipped).
Forgot about the switch-up: 24.875, 6.812, 35.906 and 11.400.
My averages have been terrible for the past few months days and so I'm going to switch it up by doing 2x2 first and then proceeding the with normal order (don't worry, the log order will remain the same): 22.462, 5.755, 40.173 and 9.379.
200 more solves left for an AO1000: 20.543, 5.996, 36.888 and 9.247.
This is getting ridiculous: 19.962, 5.636, 40.219 and 11.274.
Yes? 19.093, 5.612, 37.009, 11.737.
Nope: 20.098, 7.327, 38.656 and 7.993.
We're back? 18.709, 5.143, 38.506 and 6.759.
Meh (x2): 21.662, 6.125, 34.649 and 9.689.
Meh: 22.201, 5.474, 40.973 and 10.045.
QX TJ IW ER UO LR, WB XL JD! I DID IT! THE NEW SETUP MOVES ACTUALLY WORKED! I will add a technicality here, I forgot the "JD" part so I peeked at it. A full timed BLD solve coming soon! Averages were meh but that doesn't matter: 20.036 (so close!), 4.361, 40.565 and 8.018.
I need to stop cubing at night (x2): 23.734, 5.564, 43.749 and 7.136.
I need to stop cubing at night: 20.598, 7.136, 42.022 and 10.538.
Sigh: 21.520, 6.214, 36.180 and 8.337, at least I learnt why my "odd" memorizations for 3x3 BLD are always way off (I can't use any setup moves that disrupt the top two corners + the buffer)
2x2 was quite a shock: 21.093, 3.474 (!), 44.370 and 9.777.
Nothing to say really: 22.273, 5.233, 39.433 and 8.907.
Sigh, the corners for today's BLD attempt were totally wrong and my averages have hit an all-time low: 20.595, 8.103, 40.345 and 12.222.
It's just a matter of time: 3 corners wrong again (but I re-attempted my memorization whilst being able to look and my corner memorization was slightly wrong). Also, 3x3 PB! (11.764, here's the scramble: F L2 U L2 F2 U2 L2 R2 U2 B' R2 B F R B D2 B' U B F) and the averages were not bad too: 19.507, 5.753, 37.973 and 9.585.
My 3x3 BLD attempt was agonizingly close, I had three corners that were wrong :(
Also, averages were (arguably) more disappointing: 22.265, 7.134, 39.826 and 11.307.
These have got to be my most disappointing averages: 21.324, 7.266, 43.087 and 9.680.
Back to meh averages: 21.481, 5.477, 36.067 and 9.224.
So close with today's 3x3 BLD attempt, only about 4 corners were wrong. Today's average were great: 19.330, 4.720, 36.209 and 8.188.
Got nothing much to say: 21.268, 5.496, 38.223 and 10.216.
Don't know what's going wrong, but I can't get any correct memorization (one can't be odd and another even) and today's averages were meh (except 3x3 OH, I got a 26!): 23.784, 5.127, 32.972 (!) and 12.093.
Couldn't get any 3x3 BLD memorization since I kept getting stuck in an "edge loop". Today's 3x3 was tragic. Were it not for that +2 at the end, I would have gotten a 19.879 average. Instead: 20.546, 4.763, 39.881 and 10.050.
I checked out another example solve and this one memorized corners -> memorized edges -> executed edges -> executed corners. I tried that (with parity) and it was pretty close (~5 corners were wrong). Anyways, today's averages were bad: 25.125, 7.246, 38.246 and 8.772.
Did a 3x3 BLD attempt while seeing, I'm 99% sure my parity algorithm and corner memorization are always wrong. I'll work on that. The averages were really good: 17.640 (!), 6.461, 38.753 and 8.020.
Not bad: 19.799, 5.190, 39.064 (was so close to 40 lol) and 8.005. Got a PB today for 2x2 (1.386) and Skewb (3.268)!
Today's averages were pretty amazing: 19.030, 4.953, 38.781 and 9.570.
Today's attempt was so close it's annoying, and today's averages were not bad: 21.033, 5.817, 36.105 and a 10.531.
Even cases still leave my corners all messed up. Today's averages were terrible: 21.927, 7.347, 35.463 and 10.863.
So close yet so far with BLD, I rechecked my solution and it was right up to the edges, I think parity messed me up, maybe my algorithm is wrong? Today's averages were very meh: 21.658, 6.286, 40.089 and 8.430.
Well, that upward trajectory lasted longer than the time the US made $1 coins: 21.514, 6.383, 34.207 and a 9.668.
So close! Just messed up my corner memorization (somewhere) and today's averages were great: 19.732, 6.033, 37.433, 9.408.
We're back: 19.463, 5.182, 35.965 and a 8.541.
BLD was really close today! I think I've gotten used to the new correct setup moves. Today's averages were sad (could have gotten sub-20 in 3x3 if it wasn't for me messing up PLL): 21.694, 7.680, 40.865 and a 9.638.
Today's BLD attempt failed spectacularly and today's averages were slightly less meh (emphasis on slightly): 22.500, 5.821, 41.203 and a 8.944.
Couldn't get today's BLD attempt, and today's were very meh: 24.692, 5.152, 40.385 and a 9.958.
HOLY CRAP TODAY'S 3X3 BLD ATTEMPT WAS SO CLOSE! Only my corner memorization was a little bit wrong and the buffer for the edge was flipped (which confirms that it's possible, I need to learn what to do in that case). Today's averages were good (except for 3x3, still waiting for a streak of sub-20's): 22.320, 4.962, 35.021 and a 10.029.
I must be doing something right with 3x3 BLD, I did my edge memorization (while being able to see) and it was all correct. But after doing the parity (which I was supposed to do) the whole corner memorization got messed up. Weird. Anyways, today's averages were meh: 21.027, 6.522, 38.636 and 10.536.
Okay, I rewatched an example solve and I realized I've been making a ton of mistakes. I tried to use the new buffer location, but my setup moves are now too complicated. Maybe the buffer location doesn't matter? Anyways, today's averages were better, 3x3 sub-20 coming soon: 20.770, 6.072, 37.997 and a 9.871.
I don't even want to talk about this day cubing-wise: 20.866, 4.760, 50.749 and 9.291.
So close! I think the only place I could have potentially gone wrong was returning to the buffer. Today's 3x3 OH average was insane, almost all solves were sub-35: 22.481, 6.097, 34.596 and 8.596.
Still no luck, will actually try recording my attempt over the weekend to see any mistakes I made after the solve. Today's averages (except 3x3 OH) were meh: 22.537, 6.205, 35.843 and 9.001.
Nope, that was not the reason. Today's averages were meh again: 22.205, 7.153, 40.376 and 10.354.
I think I found the reason why my 3x3 BLD attempts have all failed, it's because I didn't do wide setup moves. I'll try again tomorrow (I messed up parity in today's attempt lol). Today's averages were meh: 20.032, 5.665, 36.412 and 10.434.
The meh-streak continues: 21.008, 5.467, 38.579 and 7.971.
So close! One good thing that came from today's 3x3 BLD attempt was that everything was generally much faster (memorization + execution), though that could mean the probability of making a mistake is now much higher... Today's averages were meh again (except for 3x3 OH): 21.947, 5.328, 38.148 and a 8.784.
Thought today would be the day, but nope, I messed up the 3x3 BLD attempt quite badly (though I'm not sure what I did wrong in the attempt, maybe messed up an execution?). Anyways, today's averages (except 3x3) were meh: 18.878 (!), 7.080, 40.929 and 10.494.
So close! I think I only messed up my corner memorization, the edges were all correct and a few corners hadn't been swapped. Anyways, today's averages were meh again: 20.580, 6.680, 39.801 and a 9.568.
My closest 3x3 BLD attempt yet! Got every step done, maybe my memoization was wrong. Anyways, today's averages were pretty meh: 19.308, 6.757, 44.479 and a 10.444.
Pretty bad all around, failed my 3x3 BLD attempt with the same mistake I've been making in the past few attempts (confused between algorithms) and got pretty meh averages: 20.538, 4.140, 54.184 and an 8.206.
Everything today was very, very sad: 21.869, 5.481, 44.561 and a 9.391.
Today's 3x3 BLD attempt was so bad it was funny, I thought mid-way the solve that I might get only a few wrong (since I forgot to do the parity algorithm) but nope. Anyways, today's averages were also, well, average. But I did get a 3x3 OH PB (22.402): 20.095, 6.131, 41.337 and an 8.516.
Got quite close with my 3x3 BLD attempt, one day... Today's averages were pretty meh: 22.241, 5.753, 41.772 and a 9.544.
I learnt yesterday night why all my 3x3 BLD attempts failed, it's because I swapped the wrong buffer piece and I didn't do the parity algorithm. I corrected both today, a successful attempt should come soon. Today's averages were good: 19.257, 4.985, 36.746 and a 7.840.
Very strange 3x3 BLD full attempt today, I somehow got all edges correct and no corners correct. Anyways, today's averages were awesome: 19.627 (!), 4.514 (!), 38.066 (!) and a 7.689 (!)
Today's averages were crazy! Got an 18.415 (!), 4.202 (!), 38.537 (!) and a 9.553. Also did my first full 3x3 BLD attempt, did not go too well but the amount of progress I'm making is amazing.
Pretty awesome averages today, got a 19.129 (!), 5.254, 37.508 (!) and a 10.109.
Today was crazy for 2x2, I destroyed my PB, twice in a row, first with a sub-3 (2.589) and then with a sub-2 (1.450), today's averages were nothing too crazy though: 20.102, 5.000 (!), 42.915 and an 8.407.
I think I've fully learnt 3x3 BLD edges! Will move on to corners tomorrow. As for the times today, a bit disappointed with 3x3 but the rest were alright: 24.521, 6.656, 36.764 (!) and a 7.299 (!)
I think I have to follow the tutorial again for 3x3 BLD, making the same mistakes over and over again. Anyways, today's averages were awesome, soon to be sort of officially sub-40 3x3 OH and sub-20 3x3: 18.546, 6.218, 35.814 and 10.457.
Again, got really close to 3x3 BLD edges attempt. As for the times today: I got a 23.001, 6.177, 34.869 (!) and a 10.518.
SO CLOSE to a true 3x3 BLD edges attempt! I was only one swap away. Anyways, I completed 500 solves in every event, and today's averages were a 21.648, 5.759, 43.116 and a 10.973.
So close to sub-40 AO5 for 3x3 OH, but I messed up the last solve. Will move on to memorizing corners for 3x3 BLD and today's times are a 20.929, 5.127, 40.641 and a 9.240.
Pretty great for 2x2, got a 20.645, 4.702 (!), 43.245 and a 10.341.
Today was crazy for 3x3 OH again, got a 21.468, 6.339, 37.748 (!) and a 10.506.
Amazing day! Got a 3x3 OH PB (24.204) (!) and great averages for 3x3 and 3x3 OH: 19.394 (!), 6.030, 35.962 (!) and a 10.915.
Not bad, got a 21.398, 5.979, 41.616 and a 10.386.
Amazing averages! Got a 19.056 (!), 5.725, 39.427 and a 8.321.
Progress! I solved the 3x3 BLD edges (though I could see the cube, just trying to get my memorization correct) and today's 2x2 was crazy good. 20.787, 4.923 (!), 40.937 and a 10.749.
Started with my 3x3 BLD practice (though it will be a slow journey) and I got a 20.636, 6.771, 44.624 and an 8.753.
Pretty good day, got another successful 2x2 BLD solve, going to move on to 3x3 BLD with this video, as for the times, I got a 19.373 (!), 6.114, 41.561 and a 9.421.
PaNama Times Something Goes Mad! That was the memorization for my first ever legit 2x2 BLD solve! I did it again (though the scramble was pretty easy). As for the times today, they were pretty mid: 20.916, 5.551, 44.045 and a 9.939.
Happy new year! Getting really close with 2x2 BLD, I think my main problem is what I memorize is wrong, the memorization and solving part is not hard. Anyways, I got a 21.460, 6.278, 45.938, 9.669.
Still no luck with 2x2 BLD, but the times today were not bad, nearly got a 3x3 OH PB (29.480): 20.790, 6.353, 37.504 (!) and a 8.922. Hope to go for a competition in 2022!
No luck with 2x2 BLD still and a pretty average day, 21.719, 6.508, 43.146 and a 11.594.
So close! I attempted 2x2 BLD (by closing my eyes lol) thrice and got only two pieces unsolved in the last two attempts. Hopefully, by the end of this week, I'll know how to solve it BLD. Anyways, today's times were nothing great: 23.027, 6.431, 43.704 and 8.318.
Alright day, got a 21.078, 5.375, 39.117 (!) and a 12.108.
Solved a 2x2 with the Old Pochmann method! (though I wasn't blindfolded, and I can only do it if I don't have a new cycle, I'll have to revise that), as for the times, I got a 19.002 (!), 5.674, 40.539 and 9.591.
Made good progress learning 2x2 blindfolded with this video and got alright times for today: 21.616, 6.931, 39.859 (!) and a 10.084.
Meh, got a 21.567, 5.878, 40.827 and a 9.778.
Learnt full PLL on 3x3! As for the times, I got a 21.452, 5.898, 41.674 and a 10.835.
400 solves! The AO100's are 21.074, 6.508, 41.509 and 9.773, the AO5's I got are a 18.486 (!), 5.573, 46.521 and a 9.611.
Getting better, 5 more solves till 400 for each event! As for the times, I got a 20.635, 5.822, 37.404 (!) and a 9.471.
Meh again, got a 21.244, 6.696, 40.381 and a 10.185. Learnt the Gc perm, only one more to go!
Even worse this time, got a 20.709, 7.065, 48.662 and a 10.913.
Alright I guess, got a 21.317, 7.003, 40.893 and a 9.900. Hope to learn full PLL by the end of this week.
Pretty good, got a 18.939 (!), 7.039, 41.364 and 8.666 (!). Is Gc perm the worst G perm?
On fire for 3x3 OH! Today's 3x3 times were very funny, I got a 30 in one of them, 20 in two of them and then a 15 in the last solve. Anyways, I got a 20.895, 6.642, 34.869 (!) and a 9.233.
Slightly worse, but still did very good in 3x3 OH, got a 22.331, 5.687 (!), 37.640 (!) and a 9.206. Going to learn the Gc perm tomorrow.
Awesome day cubing wise! Got a 19.421 (!), 5.322 (!), 38.880 (!) and a 8.327 (!).
Skewb PB (3.601)! As for the rest of the times, I got a 21.208, 6.461, 43.598 and a 9.656.
Meh, got a 23.123, 5.687, 44.295 and a 10.790.
Awesome day for 3x3 OH, and I finally learnt the Gb perm, two more left till full PLL! I got a 23.261, 6.302, 36.469 (!) and an 8.115 (!)
Another alright day, waiting for the day I get a sub-35 average on 3x3 OH. Got a 22.886, 7.857, 38.093 (!) and a 9.395.
Alright day, got a 24.017, 6.548, 39.872 (!) and a 8.367 (!), getting used to the Gb perm.
Not bad again! Got a 19.181 (!, sub-20 coming soon), 7.012, 40.600 and a 8.617 (!). Trying to learn 2x2 BLD with this video.
Not bad, 18.317 (!), 6.659, 43.555 and 11.729. The Gb perm is pretty hard.
Alright day, got a 19.128 (!), 6.142, 40.139 and a 11.155.
Slightly better, got a 21.576, 6.995, 48.182 and a 9.809, going to learn the Gb perm tomorrow.
Pretty bad day, got a 21.047, 6.170, 50.366 and a 9.781. At least I learnt the Ga perm.
Not bad, got a 19.496 (!), 6.902, 40.402 and a 11.875. Finished N Perms and hope to learn full 3x3 PLL by next week.
300 solves! My AO100's are 20.783, 5.877, 42.701 and a 9.891. As for my AO5's today, I got a 20.249, 4.813 (!), 41.474 and an 11.669. Also sent a proposal to create a cubing challenge for EA Cambridge's Slack group!
Got a 14 single in 3x3! But other than that, an average day. Got a 19.900 (!), 5.993, 43.128 and a 10.339.
Talk about an early Christmas miracle, I got a 14.166 3x3 PB! As for the rest of the times, I got a 20.197, 6.595, 36.706 (!) and an 8.390.
This month was pretty awesome cubing-wise, sure there were plenty of average days, but I got really good at 3x3 OH (now my favourite event) and got plenty of PB's! Oh, I got 20.019, 7.074, 43.291 and a 8.094.
The average day has come, got a 20.047, 5.988, 42.593 and a 10.056.
Was going to be an average day, but I got a PB for 3x3 OH! (29.375) As for the rest of the times, I got a 23.697, 5.978, 39.592 (!) and a 9.283.
What a recovery, got a 20.494, 5.737, 46.187 and a 11.190.
Pretty mid today, got a 25.170, 6.910, 40.536 and a 9.746.
3X3 PB with PLL skip (14.539)! As for the rest of the times, I got a 20.491, 5.656, 41.291 and a 11.494
I think I got an AO5 PB for 3x3! I got a 18.139 (!), 5.137, 44.735 and a 9.151 (!)
Amazing day! Got a 19.178 (!), 5.274, 35.787 (!) and a 10.861.
Pretty mid, got a 21.312, 5.734, 44.323 and a 10.070.
So close to sub-40 for 3x3 OH! Got a 21.800, 5.644 (!), 40.224 (!) and a 10.965.
Much better, got a 19.348 (!), 6.056, 45.858 and a 8.337 (!).
Mid again: 20.097, 6.213, 45.935 and a 10.867.
Reached 15^{2} solves, though today my averages were pretty mid: 20.534, 6.302, 47.552 and a 10.534.
Great day, got a 18.659 (!), 4.481 (!), 43.815 and a 9.598.
Amazing day! Got a 20.118, 4.781 (!), 37.553 (!) and a 8.789. (!)
Pretty good for 3x3 and 2x2, got a 19.861 (!), 5.405 (!), 45.114 and a 11.640.
Not bad, got a 21.894, 6.561, 42.843 and a 8.672. Trying to set up jperm.net.
I reached 200 attempts for all four events, here are the AO100's: 21.648, 6.380, 46.315 and a 10.089. For the AO5's, there were pretty good: 21.344, 5.282 (!), 46.523 and a 8.131.
Okay session, got a 21.626, 5.265 (!), 41.383 and a 10.691.
Great session, got a 19.111 (!), 6.761, 42.691 and a 9.557 (!).
Pretty meh all around, got a 23.695, 6.000 (not a joke), 45.575 and a 12.027.
Alright session, got a 20.806, 6.135, 40.776 and a 10.041.
Learnt the Ga perm! My first G perm. As for the AO5's, they weren't half bad, but I can feel 3x3 sub-20 coming soon. I got a 20.842, 6.492, 41.137 and a 12.110
Pretty great session for 2x2, got a 21.192, 4.991 (!), 47.397 and a 8.940. I think I've fully learnt all the N perms!
Alright session, got a 22.703, 7.097, 46.636 and a 8.231.
3x3 PB (14.778)! I also got two sub-40's in 3x3 OH and a sub-6 AO5 for 2x2! Here are the times: a 22.017, 5.851 (!), 42.885 (!) and a 7.902 (!) For reference, here are the G perms I'm learning:
My 3x3 turning was so choppy today. Got a 21.306, 5.272, 43.433 and a 12.279. I also practised my Nb perm.
Alright session, got a 20.729, 6.346, 49.053 and a 9.319.
Was about to be a pretty good day until I got a PB for 3x3 OH! (29.578). For the rest of the times, I got a 22.646, 6.820, 39.839 (!) and an 11.581. I re-learnt the F perm for 3x3 PLL.
New month, new (pretty bad) averages. I got a 28.293, 5.824 (!), 45.115 and a 11.135. I also practised PLL's.
Got a PB for Skewb! (3.959) and got a 21.759, 6.567, 48.101 and a 7.600.
Another great session, especially for Skewb! I got a 23.748, 7.724, 48.450 and a 7.112 (!). I also learnt the N perms for PLL.
Pretty great session! Got a sub-4 for 2x2 (3.875), and got a 22.077, 6.040, 47.577 and a 7.451 (!)
Finished the rest of my solves for 3x3 OH and Skewb, got a 19.775, 6.538, 1:02.230 and a 13.673.
Oct 20, 2022-Oct 20, 2022
Participated in a local hackathon and did pretty well with my teammates! Due to privacy reasons, I was being incredibly vague.
Jul 29, 2022-Oct 18, 2022
Designed a landing page for a project I've been accepted to. In addition, I helped with app integrations among other things. Note that, due to organizational requirements, I was being incredibly vague.
Continued with a recording.
Continued (?) with a recording.
Added suggestions and ideas.
Had an awesome team meeting! In addition, I compiled a few resources.
Had a productive meeting.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Had a productive meeting and continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Got started with some research.
Had a really productive meeting, which helped to solve some of standing technical/integration enquires.
Tested a Make integration to not much avail again.
Tested a Zapier integration to not much avail. I'll try another integration tomorrow.
Had a productive meeting.
Wrote-up and sent my findings on an organisational discount.
Wrote-up and sent my findings on apps for different scenarios.
Wrote-up and sent my findings on an app integration and pricing.
Finished with the sixth draft of the first section.
Had a productive meeting and finished with the fifth draft of the first section.
Finished with the fourth draft of the first section.
Finished (?) with the third draft of the first section.
Had a productive meeting and got started with the third draft of the first section.
Jan 30, 2022-Oct 08, 2022
I was a two-time silver medalist for 2019 and 2020 in my country. Initially tried to get a similar result for 2022, but ended up losing interest. Note that, for the majority of this project, I got four 5x5s and two 6x6s (thought it was previously two 4x4s and four 5x5s).
Got selected for the national level! (Written on Jan 14, 2023 - Though I ended up not going.)
5/6 in ~11 minutes. I've decided to pause this project. If I get selected to the national level, I'll continue this project, else it ends.
Truth be told, I do not find KENKEN enjoyable anymore. I guess the charm wears off after a while.
5/6 in ~7.5 minutes.
All correct in ~8-9 minutes.
Had my "state"-level exam which went well.
Finished the August 2022 weekly challenges: ~10 minutes and ~8 minutes, all correct for both.
Daily puzzles went well.
Daily puzzle went alright (saw the solution for the other one).
Daily puzzle went alright.
Daily puzzles went okay.
Sort of skipped today (finished one daily puzzle that I saw the solution to).
Sort of skipped today (finished one daily puzzle).
Almost 12 minutes for all correct.
Sort of skipped today (finished one daily puzzle that I saw the solution to).
~7.5 minutes for all correct.
~11-12 minutes for 5/6.
~12 minutes for all correct.
~10 and three-fourths of a minute for all correct.
Daily puzzles went okay.
Finished ~2 out of the 6 daily puzzles.
Sort of skipped today as well.
Sort of skipped today.
Daily puzzles went okay.
Daily puzzles went alright (~3-4 checks).
~11 minutes for all correct.
~6 minutes for all correct.
~11-12 minutes for all correct.
~9 minutes for all correct.
Daily puzzles went okay.
~9 minutes for all correct.
I think daily puzzles went alright?
~18 minutes for all correct.
~8 minutes for all correct.
~9.5 minutes for all correct.
~11 minutes for all correct.
Did not have too much time left in the day for KENKEN, so I just did two hard 6x6s with unlimited checks.
~11 minutes for all correct.
4 checks for two hard 6x6s.
~9 minutes for 5/6.
Solved a 7x7 for fun!
Sigh, ~14 minutes for 5/6.
~13 minutes for all correct.
~11 minutes for all correct.
For some reason, I just couldn't do today's weekly challenge. I guess I was too distracted. I'll try again tomorrow.
Daily puzzles went alright.
Don't do KENKEN when you're tired.
Daily puzzles went okay.
Back to sub-10 minutes for all correct!
Daily puzzles went well.
19 seconds shy of 10 minutes with all correct.
15 seconds shy of 10 minutes with all correct.
Daily puzzles went alright (had to basically skip the last one though).
~11 minutes for all correct (tried to pause it as I had to get up, didn't work lol).
Two sub-3s on two hard 6x6s with only one check in the last one.
~12 minutes for all correct.
~7 minutes for 5/6. All remaining weekly challenges have been completed!
~8 minutes for all correct.
~8 minutes for all correct.
~8 minutes for all correct.
~15 minutes for all correct.
~9 minutes for 5/6.
~13 minutes for all correct.
~14 minutes for all correct.
Just barely got 9 minutes for yesterday's (?) weekly challenge.
9 and 10 minutes for all correct.
7 minutes for all correct and 9 minutes for 5/6.
11 minutes for all correct.
5/6.
9 minutes for all correct.
Why is the weekly challenge daily?
12 minutes for all correct.
All correct in ~8 minutes!
Daily puzzles were alright.
15 minutes for a 6x6 wrong.
Daily puzzles were alright.
13 minutes for a 5x5 wrong.
Daily puzzles went alright.
I just got through today's weekly challenge lol.
Oof, got the last 6x6 wrong because I forgot that the sum property of a 6x6 is 21.
All correct in the Weekly challenge in 8 minutes and 20 seconds. Need to get it down to 7 by the end of this month.
Sigh, 5/6. Déjà vu?
Daily puzzles went well.
Sigh, 5/6.
Daily puzzles went well.
Could have gotten all correct in ~8 minutes if it wasn't for a silly mistake in the last 6x6.
Daily puzzles went okay.
Sigh, 4/6.
5/6. It's both good and bad that I no longer find the hard 6x6s in the daily puzzles difficult.
All correct in ~5 minutes!
5/6 in what felt like forever.
The website glitched out, so I got to do only one daily puzzle :(
Sigh. All 6x6s wrong.
Daily puzzles went okay.
~9 minutes again... but with a 6x6 left wrong :(
~9 minutes for the weekly challenge. I hope to stabilize to ~7 minutes soon enough.
Daily puzzles went pretty well.
Sigh. 11 minutes for 1 6x6 wrong.
Daily puzzles went well.
I somehow got two 5x5s wrong in today's weekly challenge. Should I slow down for 5x5s?
Daily puzzles were alright.
All correct in exactly 10 minutes lol.
Weekly challenge in ~8 minutes... with all the 6x6s wrong.
Daily puzzles were pretty bad.
All correct in ~7 minutes and 40 seconds in today's weekly challenge.
Daily puzzles were okay.
All correct in less than 7 minutes in today's weekly challenge!
Daily puzzles were alright.
Tragic, got the 5x5 wrong but the rest were correct in ~7 minutes :/
I DID IT! Just under 6 minutes for all correct in the weekly challenge!
Sigh, 8 minutes for the last 6x6 left incomplete.
Worst weekly challenge ever: ~8 minutes for three wrong (2 wrong, 1 left unattempted) :(
Daily puzzles were meh to alright.
Weekly challenge went so poorly (5/6 in more than 10 minutes) :(
Daily puzzles were meh.
Getting sort of close to the 7 minute mark with the weekly challenges!
Same issue, below 10 minutes but left one puzzle as wrong for that (to make matters worse, it was a 5x5).
Daily puzzles were alright.
~9 minutes with the last 6x6 incorrect :(
~7 minutes with all correct in the bonus challenge!
Weekly challenge took ~10 minutes but with the last 6x6 was incorrect.
Daily puzzles were pretty good!
Got below 9 minutes in the weekly challenge with all correct!
Got all correct in the weekly challenge... in ~14 minutes :(
Daily puzzles were meh.
Another weekly challenge in 9 minutes, but... I had to leave a 6x6 as incorrect for that :(
Daily puzzles were terrible lol.
I DID IT! All correct in ~9 minutes! Now I need to do all of it in 7 minutes...
Daily puzzles were not bad.
Not sure what the exact medical term is, but "the physiological feeling of having no time left in an exam/competitive setting" happened in today's weekly challenge lol. I had ~2 minutes left to reach my goal of completing a weekly challenge in 10 minutes or less and I did it... but all of the 6x6s were wrong. :(
Weekly challenge was pretty poor (one wrong in 14 minutes) and daily puzzles were half-way decent.
Daily puzzles went really well for a change.
Bad day KENKEN-wise, took ~14 minutes for all correct and daily puzzles were pretty bad.
I've noticed that with hard 6x6 puzzles, I need to often make strenuous guesses or YOLO my way out of it. Sigh.
Sigh, I was about to finish the weekly challenge in about 10 minutes, but the last 6x6 tripped me up.
I need to stop using the check button every time I put something down.
Finished the weekly challenge in under 10 minutes BUT I had to basically skip the last 6x6 for that to happen.
Not bad, a little more than 10 and a half minutes with all correct for today's weekly challenge (I miraculously got the last 6x6 correct lol).
Daily puzzles went alright.
Similar story, ~16-17 minutes but all correct (the first 6x6 was pretty darn hard).
Even worse, went down to 16 minutes with 1 wrong.
Dropped down to 15 minutes for the weekly challenge :(
Daily puzzles went meh.
Got another one below 10 minutes, though this time it took 9 minutes and 46 seconds (all correct) and the daily puzzles went a bit better.
Got below 10 minutes on the weekly challenge! (~9 and a half minutes with all correct) and daily puzzles are still meh (I even got one wrong).
Daily puzzles went laughably bad.
Weekly challenge (all correct in 12 minutes) and daily puzzles went meh, I hope to get below 10 minutes on the weekly challenge next week.
Daily puzzles went well.
Finished the weekly challenge in 11 minutes this time around and finished 2 hard 6x6s.
Bonus challenge took almost 20 minutes and I couldn't do a second hard 6x6 :(
Still took more than 10 minutes but got all correct this time. Bonus challenge will be done tomorrow!
Weekly challenge (5/6) took more than 10 minutes (I don't remember the exact time). Need to bring it down to less than 10 minutes consistently.
Daily puzzles were decent, I'm really happy at my progress at hard 6x6s.
Barely got through the weekly challenge in 10 minutes (closer to 11 actually but whatever).
Daily puzzles went alright.
Haha, they changed the weekly challenge to four 5x5s and two 6x6s (in the order), finished that with all correct in 15 minutes (which is bad, but it's my first try at it so it's alright) and the first hard 6x6 I did took me 10 minutes lol.
When solving hard puzzles, your main goal isn't to find the correct position of the numbers right away, but rather you need the fuel: this could be from the row-column sum property, just some simple logic (a +12 cell in a 6x6 always has to contain a 5 and two number that add up to seven), anything really. After that, it's a piece of π.
6/6 in 4 and a half minutes! The two hard 6x6s went alright, though I did take a lot of time for both of them.
Finished weekly challenge (5/6 in 10-ish minutes) and I think I'm ready for hard 6x6s now.
Daily puzzles went meh.
Why do I keep blundering a puzzle in the weekly challenge? Also, when will I comfortably transition to hard 6x6s, when will my weekly challenges update? So many questions.
Daily puzzles went meh, I really hope they update our weekly challenges for the next level puzzles (since I'll be getting 6x6s not 4x4s)
Made it to the next level (I somehow got the first 4x4 wrong in the school level exam) and got all correct in the weekly challenge today and the daily puzzles went okay.
For some reason, only one daily puzzle was unlocked, but it went well (one medium 6x6).
Daily puzzles (two medium 6x6s) went alright.
Slightly better, 5/6.
Got 4/6 in my last weekly challenge for this week.
New PB: Weekly challenge completed in less than 4 minutes, why couldn't have the school exam gone like this?
No weekly challenge today, but the daily puzzles (two medium 6x6s) went alright.
Sigh, got 4/6 in the weekly challenge and the daily puzzles (two medium 6x6s) went really poorly.
Both the bonus weekly challenge (5/6 in about 11 minutes) and the daily puzzles went poorly.
Finished with the weekly challenge and the daily puzzles, will complete the bonus challenge tomorrow.
Had my school-level exam. It went pretty terribly (most likely all correct in about 10 minutes) but it's very likely I proceed to the next level. Also finished weekly challenge and daily puzzles.
Finished with the daily puzzles, went really well.
Found something interesting in my weekly challenge (which went meh) and my daily puzzles: Notice the below image and the "108x" cage:
Now, there is only one possibility which is "3 x 6 x 6 x 1", but what about the position? We can use the fact that 1 has to be on the top row of the cage to our advantage and see that that there are only two possibilities left:
But regardless of which possibility is correct, 3 and 6 are always in the bottom row! So, that leaves 4 in the "9+" cage. Thought it was interesting.
Back to medium 6x6s.
Weekly challenge (one wrong in about 10 minutes) and daily puzzles (had to drop back to easy 6x6s) went bad.
Happy Pi Day, I don't think I'm ready for two hard 6x6s. I mean, I didn't check my medium 6x6 (being overconfident) and got it wrong lol.
Both the weekly challenge (all correct in > 8 minutes) and daily puzzles went badly. At least I have a bonus challenge for Pi Day.
Finished the last weekly challenge for this week (doesn't make sense, I know) in 6 and a half minutes. The first hard 6x6 was good but it took a long time to find the second one.
Going to start doing 2 hard 6x6s for my daily puzzles instead of one medium and one hard.
Finished the weekly challenge (all correct in ~5-6 minutes) and finished a medium and a hard 6x6 (again, went poorly today).
Finished a medium 6x6 in ~3 minutes but the hard 6x6 went pretty poorly today.
Not bad, got done with the weekly challenge (all correct in about 6 minutes) and finished a medium, and a hard 6x6 in ~3 minutes each.
Finished a medium, 6x6 in less than 2 minutes! Hard 6x6 went pretty well too.
Finally, the weekly challenge went well (all correct in just shy of 6 minutes) and finished a medium and hard 6x6.
Finished with the weekly challenge (was going amazingly well until I couldn't solve a dumb 5x5, still did 5/6 in 6 and a half minutes) and finished with one medium 6x6 and a hard 6x6.
I've started doing one medium 6x6 and one hard 6x6. The hard one takes ~4 minutes so my goal is to get that down to 2 minutes.
Getting better at 6x6 and today's weekly challenge was meh (one wrong in ~8 minutes)
Finished with two medium 6x6s, they went fine.
Weekly challenge was going smoothly till one 5x5 messed up my time. I took a little more than 10 minutes and couldn't get the last one. :(
Medium 6x6 takes too much time and an easy 6x6 takes too little time to solve!
Finished the weekly challenge (~10 minutes, all correct) and two medium 6x6. I have this bad habit with my daily puzzles of hitting the "Check" button, so I hit it for the last puzzle and saw I got most cells flipped (i.e. wrong). Ouch.
Finished the weekly challenge (went meh, ~10 minutes and got one wrong) and a medium and hard 6x6 (the hard one took a long time).
Finished a hard and medium 6x6 after a lot of cherry-picking lol.
Solid day, finished the weekly challenge in less than 10 minutes and finished a medium 6x6 and a hard 6x6.
Finished one medium and one hard 6x6 with all operations! (though they took a long time)
Can now solve an easy 6x6 with all operations in a little under 3 minutes! Also, today's weekly challenge went alright (all correct but in 10 minutes, got stuck with a puzzle).
Finished with two puzzles, including a medium 6x6 (with + and -) in only 2 and a half minutes!
Pretty slow throughout my two weekly challenges (one of them was a bonus and I got one wrong) and my daily puzzles. At least I started with addition and subtraction for 6x6!
Amazing day! Beat my record (all correct in 5 minutes and 12 seconds) and moved up to easy (not easiest/very easy) 6x6 with only addition.
No weekly challenge today but I finished a hard 5x5 and a very easy 6x6 (improving in time quite a bit).
Finished a hard 5x5 and a very easy 6x6 (which took way too long lol) and I think I hit a new record for the weekly challenge, all correct in 5 minutes and 59 seconds!
Finished two hard 5x5s, going to start doing one 6x6 (starting with all operations + easiest and working my way up) and one hard 5x5 since all the stages above school level have two 6x6s for my category!
Finished with 5/6 again and (for fun) I did an easy 6x6 (with only addition) and the usual hard 5x5 (both took roughly the same amount of time!)
Not bad, 5/6 again and finished the two hard 5x5s quite quickly.
Solid day, 5/6 in the weekly challenge and finished the two hard 5x5s.
Alright day, finished the two weekly challenges remaining for this week (6/6 in the first one, 4/6 in the other, both times I used a decent amount of time) and finished my two hard 5x5s for the day.
Nice! A new record, all puzzles correct in only ~6 minutes! Also got both my hard 5x5's done in less than 2 minutes. I already feel ready for the exam.
Solved the weekly challenge in only 8 minutes! (it also wrongly marked my first 4x4 as incorrect, weird) and I finished one hard 5x5 (blocked me from doing a second one, weird).
Got done with the last Jan weekly challenge (4/6, pretty meh) and finished two hard 5x5's (last one took a long time).
Alright day, finished a weekly challenge (5 out of 6) and 2 hard 5x5's (though the last one I had to rely on the check tool a lot).
Finished a weekly challenge (all correct, used a little more than half the time) and 2 hard 5x5's (all correct).
Going to finish the early-Jan weekly challenge I missed.
Awesome day KENKEN-wise, got full on the weekly challenge with 13 minutes to spare and finished two hard 5x5s.
Very similar to yesterday, finished the weekly challenge (5 out of 6 with exactly 15 minutes left) and the daily puzzles (got the hard 5x5 wrong).
Finished the weekly challenge (it was alright, 5 out of 6 with about 17 minutes left) and the daily puzzles.
Not bad, finished both my daily puzzles (though I took a long time).
Awesome progress! I got done with my two daily puzzles (all correct) and finished with weekly challenge 2 (which I completed in about half the time with all correct!)
I still got it! A medium-level 4x4 takes me less than a minute, though 5x5's I still have to work on.
Registered for this year's edition after taking a break in 2021, I'll be getting 2 4x4's and 4 5x5's. Let's see how this project will go!
Oct 28, 2021-Oct 04, 2022
I learnt a bit of Hindi and French with Duolingo and earned a Level 5 Trophy for Hindi.
After more than a year (402 days) and reaching legendary in all but ~3 Hindi skills, I'm happy to call this project done :)
Hit a 401-day streak.
Hit a 400-day streak and reached legendary for Activity in Hindi. I'll (try to) finish this project tomorrow.
Hit a 399-day streak. Will finish this project this month.
Hit a 398-day streak.
Hit a 397-day streak.
Hit a 396-day streak.
Hit a 395-day streak.
Hit a 394-day streak.
Hit a 393-day streak and reached legendary for "Home" in Hindi.
Hit a 392-day streak.
Hit a 391-day streak.
Hit a 390-day streak.
Hit a 389-day streak.
Hit a 388-day streak.
Hit a 387-day streak.
Hit a 386-day streak.
Hit a 385-day streak and reached legendary in Adjectives in Hindi.
Hit a 384-day streak.
Hit a 383-day streak.
Hit a 382-day streak.
Hit a 381-day streak.
Hit a 380-day streak.
Hit a 379-day streak.
Hit a 378-day streak.
Hit a 377-day streak.
Hit a 376-day streak.
Hit a 375-day streak.
Hit a 374-day streak.
Hit a 373-day streak.
Hit a 372-day streak.
Hit a 371-day streak.
Hit a 370-day streak.
Hit a 369-day streak.
Hit a 368-day streak.
Hit a 367-day streak.
Hit a 366-day streak.
Hit a 365-day streak!
Hit a 364-day streak.
Hit a 363-day streak.
Hit a 362-day streak.
Hit a 361-day streak.
Hit a 360-day streak. 5 more days.
Hit a 359-day streak.
Hit a 358-day streak.
Hit a 357-day streak.
Hit a 356-day streak.
Hit a 355-day streak. 10 more days.
Hit a 354-day streak.
Hit a 353-day streak. I didn't reach legendary in every skill but that's alright.
Hit a 352-day streak.
Hit a 351-day streak.
Hit a 350-day streak. I'll try to get to legendary in all the non-legendary Hindi skills in the next two days.
Hit a 349-day streak.
Hit a 348-day streak.
Hit a 347-day streak.
Hit a 346-day streak.
Hit a 345-day streak. 20 more days.
Hit a 344-day streak.
Hit a 343-day streak.
Hit a 342-day streak.
Hit a 341-day streak.
Hit a 340-day streak.
Hit a 339-day streak.
Hit a 338-day streak.
Hit a 337-day streak.
Hit a 336-day streak.
Hit a 335-day streak. 30 more days.
Hit a 334-day streak.
Hit a 333-day streak.
Hit a 332-day streak.
Hit a 331-day streak and got legendary on Work in Hindi!
Hit a 330-day streak. 35 more days.
Hit a 329-day streak.
Hit a 328-day streak.
Hit a 327-day streak.
Hit a 326-day streak.
Hit a 325-day streak.
Hit a 324-day streak.
Hit a 323-day streak.
Hit a 322-day streak.
Hit a 321-day streak.
Hit a 320-day streak.
Hit a 319-day streak.
Hit a 318-day streak.
Hit a 317-day streak (and actually hit my daily goal this time).
Hit a 316-day streak.
Hit a 315-day streak. 50 more days.
Hit a 314-day streak.
Hit a 313-day streak.
Hit a 312-day streak.
Hit a 311-day streak and reached legendary in Family.
Hit a 310-day streak.
Hit a 309-day streak.
Hit a 308-day streak.
Hit a 307-day streak.
Hit a 306-day streak.
Hit a 305-day streak.
Hit a 304-day streak.
Hit a 303-day streak.
Hit a 302-day streak.
Hit a 301-day streak.
Hit a 300-day streak. ~2 more months to go!
Hit a 299-day streak.
Hit a 298-day streak. 13 more skills left for legendary in Hindi.
Hit a 297-day streak.
Hit a 296-day streak.
Hit a 295-day streak.
Hit a 294-day streak.
Hit a 293-day streak.
Hit a 292-day streak.
Hit a 291-day streak.
Hit a 290-day streak.
Hit a 289-day streak.
Hit a 288-day streak.
Hit a 287-day streak.
Hit a 286-day streak.
Hit a 285-day streak.
Hit a 284-day streak and reached legendary in Food in Hindi!
Hit a 283-day streak.
Hit a 282-day streak.
Hit a 281-day streak. Incroyable!
Hit a 280-day streak.
Hit a 279-day streak. Why bother with inversion when Est-ce que/qu' seems to work everywhere in French when asking a question? Inversion to me is comparatively much harder.
Hit a 278-day streak.
Hit a 277-day streak.
Hit a 276-day streak.
Hit a 275-day streak.
Hit a 274-day streak and reached legendary on Nature in Hindi!
Hit a 273-day streak.
Hit a 272-day streak.
Hit a 271-day streak. Seven euros for a cappuccino?!
Hit a 270-day streak.
Hit a 269-day streak.
Hit a 268-day streak.
Hit a 267-day streak.
Hit a 266-day streak.
Hit a 265-day streak and unlocked the next set of stories!
Hit a 264-day streak. Why do we have grammatical gender?
Hit a 263-day streak.
Hit a 262-day streak.
Hit a 261-day streak and got to legendary for Food 2 in Hindi!
Hit a 260-day streak.
Hit a 259-day streak.
Hit a 258-day streak.
Hit a 257-day streak.
Hit a 256-day streak.
Hit a 255-day streak.
Hit a 254-day streak.
Hit a 253-day streak.
Hit a 252-day streak and got to legendary for Day/Month in Hindi!
Hit a 251-day streak.
Hit a 250-day streak! Back to some legendary progress for Hindi.
Hit a 249-day streak. One more day!
Hit a 248-day streak. Two more days!
Hit a 247-day streak. Three more days!
Hit a 246-day streak. Four more days!
Hit a 245-day streak. I feel like my reading/listening in French has improved quite a bit with the stories.
Hit a 244-day streak.
Hit a 243-day streak.
Hit a 242-day streak.
Hit a 241-day streak and wasted a legendary attempt :(
Hit a 240-day streak and got to legendary for Numbers (Hindi).
Hit a 239-day streak.
Hit a 238-day streak.
Hit a 237-day streak.