I began this year very excited and happy celebrating the end of the previous year which for me had been so hard, and overwhelming. The fact that I also celebrate my birthday on new years made it even more exciting. I felt like I was turning over a new leaf…
How to solve the Happy numbers problem using Python
Write an algorithm to determine if a number
A happy number is a number defined by the following process:
Starting with any positive integer, replace the number by the sum of the squares of its digits.
Given an integer
true if it is a power of two. Otherwise, return
n is a power of two, if there exists an integer
x such that
n == 2x.
We are given a couple of examples to demonstrate how the output should look like:
If you are in a career in technology, you have probably faced this dilemma when it comes to which company to work for.
People often find it hard to turn down an offer from a big tech company over a startup that people do not even know about. In fact…
Given an array
n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue.
Here, we will use the integers
2 to represent the color red, white…
We all have companies that we so bad want to work at or even intern at. For me, Google, Microsoft or Facebook was that company. I know what you’re thinking about haha, of course it had to be one of the big tech companies. …
Summer 2019, I had just finished my sophomore year of college and declared CS as my major. Being a CS student, I had seen upper class students secure internships with big tech companies in Silicon Valley, and honestly the thought of having to prepare for a technical interview let alone…
This is another hard level leetcode problem commonly asked during coding interviews. To be able to solve this problem you first need to know how to solve the Merge Two sorted lists problem.Therefore …
This is another leetcode easy level problem and it is fundamental to as well learn how to quickly solve this when asked in an interview setting.
Merge two sorted linked lists and return it as a new list. …