ARTS打卡第1周

A:Add Two Numbers  Medium

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.You may assume the two numbers do not contain any leading zero, except the number 0 itself.

Example:

Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Output: 7 -> 0 -> 8
Explanation: 342 + 465 = 807.

解析:将两个非负链表的对应位置上的数据相加,并添加到新的链表中,如果相加的结果大于10则前进一位,如(2 -> 4 -> 3)对应数据342,(5 -> 6 -> 4)对应数据465

得到的结果:342+465=807 把807添加到对应的链表中结果是7 -> 0 -> 8

解题方案:https://leetcode.com/submissions/detail/216900734/R:https://www.developer.com/java/data/diving-deeper-into-polymorphism-and-its-benefits-in-java.html一篇关于多态在java中的深度使用的文章,描述了多态的含义,提供了多态的两种实现方式,通过继承父类和实现接口来实现多态,提供了实例讲解,比较易懂,在实际使用中,我们通常会根据不同的业务需求使用其中一种或者是两种方式共同实现多态,比如需求:现在要创造一个蜘蛛侠。人有“唱歌”和“考试”的功能,蜘蛛有“爬行”和“吐丝”的功能。我们可以建立人的对象包含唱歌和考试功能,声明蜘蛛接口提供爬行和吐丝的方法,蜘蛛侠继承了人的特点(is a),实现了蜘蛛的功能(has a),可以通过蜘蛛接口和人来创建一个蜘蛛侠的对象

T:分享一个java并发的技巧,最近在看java高并发编程详解,改变了之前的一个知识误区,很多文章都会提到穿件线程有两种方式,一种是构造一个Thread,另一种是实现Runnable接口,这种说法是不严谨的,在JDK中代表线程的只有Thread这个类,线程的执行单元是run方法,你可以通过继承Tread来重写run方法来实现自己的业务逻辑,也可以通过实现Runnable接口来实现自己的业务逻辑,可以在构造Thread的时候传递Runnable,在执行run方法的时候就会执行对应的Runnable的run方法,可以通过查看对应的Thread的run方法的源码了解具体的情况Thread  thread=new Thread(new Runnable(),String threadName);通过这一方法来实现对应的线程的多态

S:最近在听左耳听风的专栏,所以分享下<<程序员如何实现技术变现>>一文,里面的观点很明确,听了几遍感觉也有启发,要持续学习,学习和关注有价值的东西,找到能发挥体现价值的地方,保持动手写代码的习惯,关注技术付费点,让自己的技术能值钱或者替公司省钱,提升自己的能力和经历,找到有价值的信息源,对外输出观点和价值观,成为优秀的人,获得优质的朋友圈,日积月累实现技术变现。
 

原文地址:https://www.cnblogs.com/wujunjie-Blog/p/10816884.html

时间: 2024-08-30 16:10:43

ARTS打卡第1周的相关文章

ARTS打卡计划第一周-Review

本周分享的文章来自于medium的 Testing Best Practices for Java + Spring Apps 这个文章主要讲的是java测试的一些最佳实践 1.避免函数返回void,返回void不利于写单元测试,因为返回void不知道方法执行的内部情况 2.使用有意义的 assertions,可以使用  https://google.github.io/truth/ 类库 3.记得测试异常 4.可以使用变量进行多次测试 5.使用Mockito进行mock测试 原文地址:http

ARTS打卡第三周

Algorithm 题目描述 Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct. Example 1: Input: [1,2,3

ARTS打卡计划第二周-Review

本周review的文章是:https://medium.com/@hakibenita/optimizing-django-admin-paginator-53c4eb6bfca3 改篇文章的题目是:Optimizing Django Admin Paginator,How we finally made Django admin fast for large tables. django分页的时候,大部分时间都会消耗在求count上,本篇文章提到了几点用于提升大表分页的方法: 1.重写默认的分

ARTS打卡计划第二周-Algorithm

665. 非递减数列  https://leetcode-cn.com/problems/non-decreasing-array/ 给定一个长度为 n 的整数数组,你的任务是判断在最多改变 1 个元素的情况下,该数组能否变成一个非递减数列. 我们是这样定义一个非递减数列的: 对于数组中所有的 i (1 <= i < n),满足 array[i] <= array[i + 1]. class Solution { public boolean checkPossibility(int[]

ARTS打卡第4周

A:Merge Intervals Medium Given a collection of intervals, merge all overlapping intervals. 解析:对给定的一个对象集合进行处理,将对象集合中存在交集的对象进行合并,行成一个新的集合 思路:优先将对象集合进行处理,将起始位置一致的对象先进行合并,返回一个map记录起始位置和对应的对象, 将对象进行排序,分析当前对象与下一对象的关系,判断下一位置的起始位置是否包含在当前的对象中,包含则合并对象的范围,不存在则新

ARTS打卡第6周

A:  Subsets 题目:Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. 题意:求一个不重复的数组的所有不重复的子集 思路:使用递归的方式求解,在对一个长度为n的数组求所有不重复的子集时:先记录当前的结果集,循环调用n次,对应的情况有是否记录当前位置的值,

ARTS打卡第5周

A: Unique Paths II Medium A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the

ARTS打卡第3周

A:Rotate Image     Medium You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOTallocate ano

ARTS打卡计划第一周

Algorithms: https://leetcode-cn.com/problems/two-sum/ Review: https://www.infoq.cn/article/EafgGJEtqQTAa_0sP62N Q版本,慢慢雏形已经出来. Tips: c++11 : 1.nullptr   是一种特殊类型的字面值, null 指针常量,可以转换成任意其他指针类型,是一个关键字.之前的NULL是一个预处理变量,需要单独引入头文件cstdlib,其值也是0. #ifdef __cplus