---
title: "Nawat Sunthornyanakit (@Earthsun) | Hashnode"
description: "I am a beginner coder who wants to keep track of my coding progress. I will post my LeetCode solutions here. Please feel free to give me advice or suggestion..."
url: "https://hashnode.com/@Earthsun"
---

@Earthsun

# Nawat Sunthornyanakit

@Earthsun · Joined June 2024

### [Last Stone Weight (Leetcode #1046)](https://earthcode.hashnode.dev/last-stone-weight-leetcode-1046?utm_source=hashnode&utm_medium=feed)

You are given an array of integers stones where stones\[i\] is the weight of the i<sup>th</sup> stone. We are playing a game with the stones. On each turn, we choose the heaviest two stones and smash them together. Suppose the heaviest two stones have ...

5 min read · [earthcode.hashnode.dev](https://earthcode.hashnode.dev/last-stone-weight-leetcode-1046?utm_source=hashnode&utm_medium=feed)

[Aug 29, 2024](https://hashnode.com/posts/last-stone-weight-leetcode-1046/66d0345937a601b2dfafdb69)

### [Binary Search](https://earthcode.hashnode.dev/binary-search?utm_source=hashnode&utm_medium=feed)

When implementing binary search, the choice between using l <= r vs. l < r, and how to update l and r (l = mid + 1 vs. l = mid, etc.), depends on the specific problem and whether you are looking for an exact match, the lower bound, or the upper bound...

4 min read · [earthcode.hashnode.dev](https://earthcode.hashnode.dev/binary-search?utm_source=hashnode&utm_medium=feed)

[Aug 26, 2024](https://hashnode.com/posts/binary-search/66cca05c6e64dc203168ea48)

### [Count Good Nodes in Binary Tree (Leetcode #1448)](https://earthcode.hashnode.dev/count-good-nodes-in-binary-tree-leetcode-1448?utm_source=hashnode&utm_medium=feed)

Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X. Return the number of good nodes in the binary tree. Example 1: Input: root = \[3,1,4,3,null,1,5\] Output: 4 Expl...

3 min read · [earthcode.hashnode.dev](https://earthcode.hashnode.dev/count-good-nodes-in-binary-tree-leetcode-1448?utm_source=hashnode&utm_medium=feed)

[Aug 18, 2024](https://hashnode.com/posts/count-good-nodes-in-binary-tree-leetcode-1448/66c210150305fae612bf02aa)

### [Binary Tree Right Side View (Leetcode #199)](https://earthcode.hashnode.dev/binary-tree-right-side-view-leetcode-199?utm_source=hashnode&utm_medium=feed)

Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example 1: Input: root = \[1,2,3,null,5,null,4\] Output: \[1,3,4\] Example 2: Input: root = \[1,nu...

3 min read · [earthcode.hashnode.dev](https://earthcode.hashnode.dev/binary-tree-right-side-view-leetcode-199?utm_source=hashnode&utm_medium=feed)

[Aug 17, 2024](https://hashnode.com/posts/binary-tree-right-side-view-leetcode-199/66c049130c9f7b3ec9435c6d)

### [Binary Tree Level Order Traversal (Leetcode #102)](https://earthcode.hashnode.dev/binary-tree-level-order-traversal-leetcode-102?utm_source=hashnode&utm_medium=feed)

Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Example 1: Input: root = \[3,9,20,null,null,15,7\] Output: \[\[3\],\[9,20\],\[15,7\]\] Example 2: Input: root = \[1\] Output: \[\[...

3 min read · [earthcode.hashnode.dev](https://earthcode.hashnode.dev/binary-tree-level-order-traversal-leetcode-102?utm_source=hashnode&utm_medium=feed)

[Aug 10, 2024](https://hashnode.com/posts/binary-tree-level-order-traversal-leetcode-102/66b7165605f45134ffe5073b)
