LeetCode: 606-Construct String from Binary Tree Solution
Problem
Given the root
of a binary tree, construct a string consisting of parenthesis and integers from a binary tree with the preorder traversal way, and return it.
Given the root
of a binary tree, construct a string consisting of parenthesis and integers from a binary tree with the preorder traversal way, and return it.
You are given a string num
, representing a large integer. Return the largest-valued odd integer (as a string) that is a non-empty substring of num
, or an empty string ""
if no odd integer exists.
Although I reach AI and research it all day, but there are too many new architectures, breakout, theories… many things I just know a rough concepts and put it away. The almost deeper understand need to until I must to be adjust the model architecture.
Read More »[Machine Learning] A LLM (Large Language Model) Visualization WebsiteThe sticky bit is an interesting application in Unix and Unix-like systems. It represents a special permission setting that offers more nuanced operations for files and directories. Most are familiar with file permissions, categorized into three distinct types: rwx (read, write, execute). The sticky bit goes a step further by regulating the rights to “delete” and “rename” files.
Read More »[Linux] Explanation Of Sticky Bit (chmod 1777)In early 2023, The pytorch 2.0 version added a new function that is torch.compile()
, It cloud be accelerate the speed of model training or inference. By using precision training with compiling, it always make my training time reduce to half.
Today I tried to load the model weights file after torch.compile()
, and then I found the weights is stored by OrderedDict data structure. This data structure is an ordered sequence, in other word its content needs to follow the order.
Neo4j is a graph database. Unlike traditional databases, the focus of a graph database is the “graph”, which means the relationships and connections between nodes (entities). Each node can represent an object (such as people, things, places…), and edges represent the relationships between nodes (such as friends, owns, located at…)
Read More »Installation Of Neo4j Graph Database And Use It By PythonAlthough Linux is reputed to be less susceptible to viruses distributed by hackers, it still remains a highly valuable and economically efficient operating system, particularly as a stable server or development environment. Consequently, Linux is not immune to malware or hacker attacks, albeit less frequent than in Windows systems.
Read More »[Linux] Installation And Use Of Open Source Anti-virus Tool: ClamAVSwap space plays an important role in Linux operating systems. It can be understood as a virtual memory space, where its name implies the act of swapping. Swap allows for temporarily writing less frequently used data to a fixed hard disk space to ensure stable system operation when the physical memory (RAM) is insufficient — this space is Swap.
Read More »[Linux] Increase Swap Space Using Commands to Prevent Memory Exhaustion