Exploring bulkWriteMongoDB has many interesting built-in methods, and one of them is bulkWrite, which allows batch processing of write operations in a specified order. This method has been available since version 3.2. The syntax of bulkWrite is simple: db.collection.bu...Jun 8, 2023 · 2 min readubuntumeta.hashnode.dev
How to choose Math.ceil and Math.floor correctlyMany times we want to calculate something by dividing operations.But we might get a float value as a result, for example, 5 / 2 = 2.5. In javascript, we have Math.ceil and Math.floor method to use. They have a huge difference from each other. The Mat...May 30, 2023 · 1 min readubuntumeta.hashnode.dev
Zigzag conversionHere is the solution of python: lass Solution: def convert(self, s: str, numRows: int) -> str: if numRows == 1 or numRows >= len(s): return s # Create an empty list to hold characters in each row rows = [''] ...Apr 25, 2023 · 1 min readubuntumeta.hashnode.dev
Expand way to solve longest palindrome stringLet's continue to talk about the longest palindrome sub string question.The brute force way take has poor performance. We can consider expanding a specific position from a string to find the longest palindrome sub-string.Look for each character and c...Mar 29, 2023 · 2 min readubuntumeta.hashnode.dev
Brute way to solve longest palindrome substring questionThe longest palindrome substring is an interesting question in computer science.Many people solve it in different ways. Today I will introduce the most direct way, the brute force solution to handle this problem.Actually, I wan to write it in javascr...Mar 29, 2023 · 2 min readubuntumeta.hashnode.dev