首页 > TAG信息列表 > Explanation

【Java学习Day06】注释种类、符号及用法

注释种类 单行注释:只能注释一行文字 多行注释:可以注释一段文字 文档注释:用来生成说明文件 注释符号及用法 单行注释:// //后面写注释 多行注释:/**/ /* 我是注释 我是注释 我是注释 */ 文档注释:/***/ /**加回车即可打出文档注释的框架 java常用的文档注释标签 1、@a

BitMask 相关

318. Maximum Product of Word Lengths Given a string array words, return the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. If no such two words exist, return 0.  Example 1: Input: words = ["abcw&

Explanation of logistic regression cost function

Explanation of logistic regression cost function \[\begin{array}{c} \hat{y} = \sigma(w^Tx+b)\quad where\;\sigma(z) = \frac{1}{1+e^{-z}}\\ interpret \quad\hat{y} =P(y=1\mid x)\\ if\quad y=1:P(y\mid x)=\hat{y}\\ if\quad y=0:P(y\mid x

779. K-th Symbol in Grammar. Sol

这个题目是没有官方Sol的。用循环是不可以解出的(Memory or Time exceeded),罕见的必须要用递归的题目,而且递归的写法也很优雅 We build a table of n rows (1-indexed). We start by writing 0 in the 1st row. Now in every subsequent row, we look at the previous row

[LeetCode] 1053. Previous Permutation With One Swap

Given an array of positive integers arr (not necessarily distinct), return the lexicographically largest permutation that is smaller than arr, that can be made with exactly one swap (A swap exchanges the positions of two numbers arr[i] and arr[j]).

二进制枚举子集

\(\text{Code}\) for(int S = 0; S < (1 << n); S++) for(int T = S; T; T = (T - 1) & S) //do something \(\text{Explanation}\) \(T\) 为 \(S\) 的子集,且枚举子集的复杂度是 \(O(3^n)\)

【李宏毅2020 ML/DL】P26-33 Explainable ML

我已经有两年 ML 经历,这系列课主要用来查缺补漏,会记录一些细节的、自己不知道的东西。 已经有人记了笔记(很用心,强烈推荐):https://github.com/Sakura-gh/ML-notes 本节内容综述 机器为什么“能”知道?可以从两个角度考虑,比如对于一个分类问题,可以考虑:Local Explanation: Why do you

可解释性论文阅读笔记2-Leveraging Language Models

ACL2019的一篇文章,主要亮点是利用预训练语言模型中的丰富信息生成解释,辅助CQA(Commonsense Question Answer)任务,对比CQA的the state of the art baseline,提升了10%的准确率,文章的链接如下:https://www.aclweb.org/anthology/P19-1487/Explain Yourself! Leveraging Language Models

Chrome的启动参数

List of Chromium Command Line Switches   Condition Explanation --[1] ⊗ Classic, non-material, mode for the |kTopChromeMD| switch. 

1680. Concatenation of Consecutive Binary Numbers (M)

Concatenation of Consecutive Binary Numbers (M) 题目 Given an integer n, return the decimal value of the binary string formed by concatenating the binary representations of 1 to n in order, modulo 109 + 7. Example 1: Input: n = 1 Output: 1 Explanation: &quo

ocjp 考试题之十

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811QUESTION 230 Given:10. class One {11. public One foo() { return this; }12. }13. class Two extends One {14. public One foo() { return this; }15. }16. class Three extends Two {17. // insert meth

OCJP 考试题之九

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811QUESTION 177 Given:1.     class TestException extends Exception { }2.     class A {3.     public String sayHello(String name) throws TestException {4.     if(name == null) throw ne

991. Broken Calculator

On a broken calculator that has a number showing on its display, we can perform two operations: Double: Multiply the number on the display by 2, or; Decrement: Subtract 1 from the number on the display. Initially, the calculator is displaying the number

908. Smallest Range I

Given an array A of integers, for each integer A[i] we may choose any x with -K <= x <= K, and add x to A[i]. After this process, we have some array B. Return the smallest possible difference between the maximum value of B and the minimum value o

1053. Previous Permutation With One Swap

Given an array A of positive integers (not necessarily distinct), return the lexicographically largest permutation that is smaller than A, that can be made with one swap (A swap exchanges the positions of two numbers A[i] and A[j]).  If it cannot b

509. Fibonacci Number

问题: 斐波那契函数。 F(0) = 0,   F(1) = 1 F(N) = F(N - 1) + F(N - 2), for N > 1.给定N,求解F(N) Example 1: Input: 2 Output: 1 Explanation: F(2) = F(1) + F(0) = 1 + 0 = 1. Example 2: Input: 3 Output: 2 Explanation: F(3) = F(2) + F(1) = 1 + 1 = 2. Example 3:

915. Partition Array into Disjoint Intervals

问题: 给定数组,切分为left和right,使得left的所有元素<=right的所有元素,返回left的长度 Example 1: Input: [5,0,3,8,6] Output: 3 Explanation: left = [5,0,3], right = [8,6] Example 2: Input: [1,1,1,0,6,12] Output: 4 Explanation: left = [1,1,1,0], right = [6,12] No

lintcode算法题之114-不同的路径

有一个机器人的位于一个 m × n 个网格左上角。 机器人每一时刻只能向下或者向右移动一步。机器人试图达到网格的右下角。 问有多少条不同的路径? 样例 Example 1: Input: n = 1, m = 3 Output: 1 Explanation: Only one path to target position. Example 2: Input: n

1221. Split a String in Balanced Strings

Balanced strings are those who have equal quantity of 'L' and 'R' characters. Given a balanced string s split it in the maximum amount of balanced strings. Return the maximum amount of splitted balanced strings.   Example 1: Input: s =

[LeetCode] 159. Longest Substring with At Most Two Distinct Characters

Given a string s , find the length of the longest substring t that contains at most 2 distinct characters. Example 1: Input: “eceba” Output: 3 Explanation: tis “ece” which its length is 3. Example 2: Input: “ccaabbb” Output: 5 Explanation: tis “

An Intuitive Explanation of GraphSAGE

By Rıza Özçelik Original post: https://towardsdatascience.com/an-intuitive-explanation-of-graphsage-6df9437ee64f    DeepWalk is a transductive algorithm, meaning that, it needs the whole graph to be available to learn the embedding of a node. Thus, w

Leetcode之Power of Two

题目: Given an integer, write a function to determine if it is a power of two. Example 1: Input: 1 Output: true Explanation: 20 = 1 Example 2: Input: 16 Output: true Explanation: 24 = 16 Example 3: Input: 218 Output: false 代码: 方法一——常规思路,时间

解释与注意:用于视觉问答的一场获得注意的两人游戏模型《Explanation vs Attention: A Two-Player Game to Obtain Attention for VQA》

目录 一、文献摘要介绍 二、网络框架介绍 三、实验分析 四、结论 这是视觉问答论文阅读的系列笔记之一,本文有点长,请耐心阅读,定会有收货。如有不足,随时欢迎交流和探讨。 一、文献摘要介绍 In this paper, we aim to obtain improved attention for a visual question answering

k Sum

Description Given n distinct positive integers, integer k (k <= n) and a number target. Find k numbers where sum is target. Calculate how many solutions there are? Example Example 1 Input:List = [1,2,3,4]k = 2target = 5Output: 2Explanation: 1

Leetcode: Backspace String Compare

Given two strings S and T, return if they are equal when both are typed into empty text editors. # means a backspace character.Example 1:Input: S = "ab#c", T = "ad#c"Output: trueExplanation: Both S and T become "ac".Example 2