avatar
Articles
56
Tags
0
Categories
10

Home
Archives
Categories
Messageboard
Dan's Blog
Search
Home
Archives
Categories
Messageboard

Dan's Blog

Hash 🌺
Created2023-03-18|LeetCode
noteIn a standard HashMap implementation, each key must be unique. If you attempt to put the same key with a different value into a HashMap, the new value will overwrite the existing value associated with that key. This is because the purpose of a HashMap is to provide a one-to-one mapping between keys and values. pros/cons Advantages of Hash: Hash provides better synchronization than other data structures. Hash tables are more efficient than search trees or other data structures. Hash ...
Hash 🌺
Created2023-03-18|LeetCode
note1234567891011121314151617181920212223242526272829303132333435 #string -> char char[] ch = s.toCharArray(); #charArray -> string return new String(ch); char[] charArray = {'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', '!'}; String str = new String(charArray); #char -> string: char myChar = 'A'; String myString = &qu ...
Prefix
Created2023-03-15|LeetCode
Prefix 🌼303. Range Sum Query - ImmutableEasy Given an integer array nums, handle multiple queries of the following type: Calculate the sum of the elements of nums between indices left and right inclusive where left <= right. Implement the NumArray class: NumArray(int[] nums) Initializes the object with the integer array nums. int sumRange(int left, int right) Returns the sum of the elements of nums between indices left and right inclusive (i.e. nums[left] + nums[left + 1] + ... + nums[rig ...
LinkedList
Created2023-03-08|LeetCode
Linked List 🌼12345678910111213141516171819202122public class ListNode { // 结点的值 int val; // 下一个结点 ListNode next; // 节点的构造函数(无参) public ListNode() { } // 节点的构造函数(有一个参数) public ListNode(int val) { this.val = val; } // 节点的构造函数(有两个参数) public ListNode(int val, ListNode next) { this.val = val; this.next = next; }} 203. Remove Linked List ElementsEasy Example : 12Input: head = [1,2,6,3,4,5,6], val ...
SpringBoot
Created2023-03-06|Software Development
Intellij IDEA is not recognizing java files as runnable right-mouse click on your src navigate to “Mark Directory As” choose “Sources Root” It will now recognize your files correctly and your main classes will be able to run again Web server failed to start. Port 8080 was already in use. First check what processes are using that specific port, then killing it using its process ID: Run netstat -ano | findstr < Port Number > This will identify which process is listening on port 8080. Tak ...
Heap 🌺
Created2023-03-01|Algorithm
Binary TreeTypes of binary tree1. Full Binary TreeA full Binary tree is a special type of binary tree in which every parent node/internal node has either two or no children. To learn more, please visit full binary tree. 2. Perfect Binary TreeA perfect binary tree is a type of binary tree in which** every internal node has exactly two child nodes and all the leaf nodes are at the same level.** Perfect Binary Tree To learn more, please visit perfect binary tree. 3. Complete Binary TreeA comp ...
gradient descent & gradient ascent
Created2023-02-21|Machine Learning
https://blog.csdn.net/weixin_39631030/article/details/81260960?spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-4-81260960-blog-121268161.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-4-81260960-blog-121268161.pc_relevant_default&utm_relevant_index=8
MongoDB🥭
Created2023-02-21|Software Development
What is CRUD?Create, Read, Update, and Delete (CRUD) are the four basic functions that models should be able to do, at most. Error message: Process finished with exit code -1073741819 (0xC0000005)问题描述: idea中启动项目报 Process finished with exit code -1073741819 (0xC0000005) ,如图所示: 问题解决: 原因:经过多方查证,问题最终定位在金山词霸2016上,如果开启了金山词霸的划译功能,就会出现此错误,具体原理有待研究。在关闭金山词霸时,有时idea也会自动关闭。 ​ 解决:关掉金山词霸,或者把金山词霸的划译功能关掉,然后重启idea,再运行项目就没问题了。经过尝试,发现只要在IDEA第一次打开并运行的时候,没有开启金山词霸的划译功能,那么之后就算开启也不会有问题。所以如果一定需要用金山,就先打开idea运行项目 ...
Pytorch
Created2023-02-17|Machine Learning
CPU GPUCPU: 总结成少量的复杂计算 GPU: 总结为大量的简单运算 CUDAWhile GPUs were originally designed for graphics processing, their architecture makes them well-suited for parallel processing, and they are indeed used for a variety of general-purpose computing tasks, not just simple ones. The parallel architecture of GPUs enables them to handle computationally intensive tasks much more efficiently than traditional CPUs for certain types of workloads. CUDA allows developers to harness the parallel processing capabilit ...
Sorting Algorithm 🌺
Created2023-02-15|Algorithm
1. Merge Sort The MergeSort function repeatedly divides the array into two halves until we reach a stage where we try to perform MergeSort on a subarray of size 1 i.e. p == r. After that, the merge function comes into play and combines the sorted arrays into larger arrays until the whole array is merged. Pseudocode:1234567MergeSort(A, p, r): if p > r return q = (p+r)/2 mergeSort(A, p, q) mergeSort(A, q+1, r) merge(A, p, q, r) JAVA:1234567891011121314151617181 ...
1…456
avatar
Dan
Lack the words to compliment myself today.
Articles
56
Tags
0
Categories
10
Follow Me
Announcement
This is my Blog
Recent Post
DP2024-06-30
Greedy2024-06-24
💐Linear Neural Networks for Regression💐2024-06-22
💐Preliminaries💐2024-06-21
Backtracking2024-06-15
Categories
  • Algorithm3
  • Gaussian Splatting1
  • Image Process1
  • LeetCode12
  • LeetCode29
  • ML2
  • Machine Learning2
  • MySql1
Archives
  • June 20248
  • May 20245
  • April 20246
  • March 20241
  • November 20231
  • September 20231
  • August 20231
  • July 20237
Info
Article :
56
UV :
PV :
Last Push :
©2020 - 2024 By Dan
Framework Hexo|Theme Butterfly
Search
Loading the Database