[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
<>兑换了一个力扣鼠标垫
说来也算是无心插柳,自己作为半个转行仔,一开始压根不知道什么 leetcode
。工作会在网上了解到算法数据结构的重要性,才慢慢的进入力扣开始做题。也没有具体的学习规划,只时不时做几题玩玩。时间久了积分就上去了(当然水平依旧很普通)。再后来知道积分可以兑换东西,现在刚需一个鼠标垫就顺手兑换了。
<>谈一下对算法和数据结构的看法
作为一个普通的java web仔,从java
web这个方向来讲的话,我觉得懂得常见的一些算法数据结构就差不多了。平时也还是以完成业务功能,解决工作中的实际问题为主。不过多做做题锻炼锻炼脑子也不错,编程能力也确实会有所提升。
事实上我遇到笔试或者做力扣每日一题经常有不会做的情况,感觉也不用太在意,其实这和八股文一样,除了证明你最近背过这个东西外,也没啥其他的意义。
但是现在行业的人太多了,招聘要求越来越高,对于稍微好点的公司,如果没有和公司匹配或者比较不错的项目经历,其他方面也没啥亮点,那算法也许就是最后一根救命稻草了。
<>最后分享一下我开始做力扣题时印象最深的一道题。
力扣第五题: 最长回文子串,因为当时一开始做了几道题,各种不会,想放弃了。直到做出了这题,
比一些优秀题解还快点,才有了兴趣坚持下来。
class Solution { char[] chs; int skipSize = 0; int resSize = 0; String res = ""
; public String longestPalindrome(String s) { chs = s.toCharArray(); for (int i
= 0; i < chs.length; i++) { matchLeftAndRight(i); //跳过右侧相同字符 i += skipSize; }
return res; } private void matchLeftAndRight(int idx) { int leftIdx = idx - 1;
int rightIdx = idx + 1; //如果右边有相同的字符,右移 while (rightIdx < chs.length && chs[
rightIdx] == chs[idx]) { rightIdx++; } //记录跳过相同的字符的个数 skipSize = rightIdx - idx
- 1; while (leftIdx >= 0 && rightIdx < chs.length && chs[leftIdx] == chs[
rightIdx]) { leftIdx--; rightIdx++; } leftIdx++; rightIdx--; int cuStrSize =
rightIdx- leftIdx + 1; if (cuStrSize <= resSize) { return; } resSize = cuStrSize
; res = new String(chs, leftIdx, cuStrSize); } }