Skip to main content

Posts

Showing posts from April, 2022

The Core of SEO

This is a summary from book “3 Months to No.1: The “No-Nonsense” SEO Playbook for Getting Your Website Found on Google” /  https://amzn.to/3KqkE6x The core of SEO. Basically, all we do with SEO is that we optimize for keywords.  When we optimize for a keyword, we mean one or multiple search terms, that the customers would search for. This is where the battle happens, and it's a zero-sum game. Meaning if you want to beat someone from being at the first place on Google, a search results, you would need to remove in from there.  In SEO, we optimize for 3 types of keywords: 1. Information 2. Commercial 3. Brand. With informational customers are just searching for information while in commercial customers are actually looking to solve a problem they have fixed a door in their house, in branded keywords customers are looking for a specific brand. We want to: 1. Find keywords in one of first 3 categories. 2. Rule out keywords that we wouldn't have the budget to fight for. Estimate wha

LeetCode 129 Sum Root to Leaf Numbers

LeetCode 129 Sum Root to Leaf Numbers Given a root of binary tree containing digits from 0 to 9 only. Return the total sum of all root to leaf. The question is taken from the book “ Elements of Programming Interviews in Python” page 125 https://amzn.to/3y84FHQ We see we have here these routes to path 495 +491 +40 Which in total is 1026 Now let’s see how to solve it in java /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val, TreeNode left, TreeNode right) { * this.val = val; * this.left = left; * this.right = right; * } * } */ class Solution { // This is an excellent trick to save us from passing params. int total = 0; public int sumNumbers(TreeNode root) { sumNumbers(root, 0); return total; } private void sumNumbers(TreeNo