随笔分类 -  Algorithms

摘要:Reverse a singly linked list. Example: Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both? Approach 阅读全文
posted @ 2019-12-06 23:13 Zhentiw 阅读(226) 评论(0) 推荐(0)
摘要:Given a binary tree, return the inorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iteratively 阅读全文
posted @ 2019-12-05 21:30 Zhentiw 阅读(119) 评论(0) 推荐(0)
摘要:"|" can be used as assign "&" can be used as check 阅读全文
posted @ 2019-12-04 19:41 Zhentiw 阅读(103) 评论(0) 推荐(0)
摘要:Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文
posted @ 2019-12-04 19:37 Zhentiw 阅读(112) 评论(0) 推荐(0)
摘要:Previous one: https://www.cnblogs.com/Answer1215/p/11974453.html Say you have an array for which the ith element is the price of a given stock on day  阅读全文
posted @ 2019-12-03 17:19 Zhentiw 阅读(229) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-12-03 03:42 Zhentiw 阅读(4) 评论(0) 推荐(0)
摘要:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2019-12-02 16:29 Zhentiw 阅读(154) 评论(0) 推荐(0)
摘要://If you know a solution is not far from the root of the tree: BFS, because it is faster to get closer node //If the tree is very deep and solutions are rare: BFS, DFS will take a longer time becau... 阅读全文
posted @ 2019-11-29 16:33 Zhentiw 阅读(193) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <head> <title>Parcel Sandbox</title> <meta charset="UTF-8" /> <!-- Load TensorFlow.js --> <script src="https://cdn.jsdelivr.net 阅读全文
posted @ 2019-11-26 17:39 Zhentiw 阅读(412) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-08-15 02:53 Zhentiw 阅读(4) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-08-14 00:46 Zhentiw 阅读(1) 评论(0) 推荐(0)
摘要:Test: 阅读全文
posted @ 2019-08-11 22:01 Zhentiw 阅读(262) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-08-09 02:40 Zhentiw 阅读(3) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-08-08 02:28 Zhentiw 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-08-07 01:03 Zhentiw 阅读(3) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-07-09 01:38 Zhentiw 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-06-26 02:18 Zhentiw 阅读(1) 评论(0) 推荐(0)
摘要:// Directions // Write a function that returns the number of vowels // used in a string. Vowels are the characters 'a', 'e' // 'i', 'o', and 'u'. // E 阅读全文
posted @ 2019-06-21 23:29 Zhentiw 阅读(179) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-06-05 02:56 Zhentiw 阅读(3) 评论(0) 推荐(0)
摘要:The problem we will solve is to convert from Celsius to Fahrenheit, where the approximate formula is: 𝑓=𝑐×1.8+32 We will give TensorFlow some sample 阅读全文
posted @ 2019-06-02 23:01 Zhentiw 阅读(286) 评论(0) 推荐(0)