文章
PAT A1120
!clipboard.png(/img/bVboDwR?w1485&h523)水题,没什么可说的<pre<codeinclude<iostream>include<stdlib.h>include<stdio.h>inclu
215. Kth Largest Element in an Array
Findthekthlargestelementinanunsortedarray.Notethatitisthekthlargestelementinthesortedorder,notthekthdistinctelement.Example
PAT A1116
!clipboard.png(/img/bVboDoI?w1474&h490)hash数组能少开就少开,而且还可以利用set进行去重管理<pre<codeinclude<iostream>include<set>include&l
PAT A1104
!clipboard.png(/img/bVboC4X?w1512&h642)如果采用单纯的暴力枚举,会出现超时问题,可以跟绝递推来找出来规律;代码如下:<pre<codeinclude<iostream>include<stdlib.h&g
Tensorflow源码解析1 -- 内核架构和源码结构
1主流深度学习框架对比当今的软件开发基本都是分层化和模块化的,应用层开发会基于框架层。比如开发LinuxDriver会基于Linuxkernel,开发Androidapp会基于AndroidFramework。深度学习也不例外,框架层为上层模型开发提供了强大的多语言接口、稳定
【Leetcode】100. 相同的树
题目给定两个二叉树,编写一个函数来检验它们是否相同。如果两个树在结构上相同,并且节点具有相同的值,则认为它们是相同的。示例1:<pre<code输入:11/\/\23
409. Longest Palindrome
Givenastringwhichconsistsoflowercaseoruppercaseletters,findthelengthofthelongestpalindromesthatcanbebuiltwiththoseletters.This
142. Linked List Cycle II
Givenalinkedlist,returnthenodewherethecyclebegins.Ifthereisnocycle,returnnull.Torepresentacycleinthegivenlinkedlist,weusea
PAT A1059 质因子分解
!clipboard.png(/img/bVboyvA?w1488&h486)这里需要注意一下,longint就是int,一样的。。。<pre<codeinclude<iostream>include<stdlib.h>include&l
PAT A1096 质因子分解
!clipboard.png(/img/bVboykO?w1496&h533)这道题没有用常规的从小到大分解质因子,而是要连续的质因子;其实思路很简单,从2~sqrt(n)进行枚举,使得n%temp是否能够取余为0,temp为连续质因子的乘积。在每次迭代中记录最长的质因子序列和相
已加载文章中没有匹配内容,试试其他关键词或清空搜索。