所有文章
分享技術、電影、動漫、遊戲和旅遊的心得
Learn how to reverse an array in place with this efficient, space-saving technique. In this post, we’ll explore swapping elements directly within the original array without creating a new one, practicing some key array manipulation skills along the way. Perfect for those looking to level up their JavaScript skills!
Today, we’re tackling the Reverse Words algorithm! This is a fun little challenge where we take a sentence, flip each word individually, and put the sentence back together—no messing with the word order, just reversing each word. Let’s dive in!
The algorithm we'll explore in this post is the Caesar Cipher. This classic encryption technique shifts each letter in a string by a specified number of places in the alphabet.
The 'Is Palindrome' algorithm checks whether a string reads the same forward and backward, ignoring spaces and punctuation. It's a simple yet classic algorithm that can be easily implemented with JavaScript string and array manipulation.
這是我在部落格寫的第一篇日本關西旅遊紀錄,所以網址命名用 "kansai-travel-1"。這次的關西八天自由行,對我來說意義非凡,雖然這是我第四次來日本,更是第三次踏上關西地區,但因為疫情的關係,睽違了好幾年才再度來到這片熟悉又充滿回憶的土地。這次行程規劃得相當充實,除了經典景點外,還安排了一些過去沒去過的新地方,當然,環球影城(USJ)依然是必訪之地,尤其是全新的任天堂園區,對我這種長年遊戲玩家來說,怎麼可能錯過!
In this post, we'll break down a common algorithm question you might see in coding interviews: the Harmless Ransom Note. It’s a great example to understand how to manipulate strings and use objects as hash tables for performance improvements. Plus, it’s relatively straightforward but offers a solid practice in understanding time complexity.
Hey there, fellow coders! Today, we're diving into a concept that's super important for anyone who writes algorithms: Big O notation. It helps us understand how an algorithm performs as the size of its input grows. Think of it as a way to measure the efficiency of our code. Let’s break it down into bite-sized pieces, along with some relatable examples.
Fizz Buzz is often the very first algorithm people learn. It's a classic and fundamental concept, serving as an entry point into algorithm learning — simple yet fun!