面试算法题
1、字符串转化为整数
https://www.cnblogs.com/mxwbq/p/10945650.html
2、不用加减乘除实现加法
https://blog.csdn.net/qq_23031939/article/details/82177625
3、打印n个数中的质数
筛除法:https://www.jianshu.com/p/c12eb2c2160d
4、计数质数
https://leetcode-cn.com/problems/count-primes/
5、反转链表
https://leetcode-cn.com/problems/valid-parentheses/
6、双向链表
7、前序遍历
8、冒泡+快排
9、二分查找
https://leetcode-cn.com/problems/binary-search/submissions/
10、两数之和
https://leetcode-cn.com/problems/two-sum/submissions/
11、有效括号
https://leetcode-cn.com/problems/valid-parentheses/
12、从有序数组中找出某个数出现的次数【有序数组,返回给定数字出现的次数】
https://blog.csdn.net/Jeff_Winger/article/details/81281619
13、分解质因数
import java.util.Scanner; public class abc { public static void main(String args[]) { @SuppressWarnings("resource") Scanner in = new Scanner(System.in); System.out.println("请输入要分解质因数的正整数:"); int numInput = in.nextInt(); factor(numInput); } //分解质因数 public static void factor(int num) { System.out.print("分解的结果为:"); for(int i=2;i<=Math.sqrt(num);i++) { if(num%i == 0) { System.out.print(i+"*"); num/=i; i--; } } System.out.println(num); } }
14、code:有字符串——aabb,abca,要求输出字符串中第一个不重复字母的位置,如果没有不重复的字母,则输出-1
https://www.nowcoder.com/questionTerminal/1c82e8cf713b4bbeb2a5b31cf5b0417c?answerType=1&f=discussion
15、利用java实现post请求
https://testerhome.com/topics/9096
https://blog.csdn.net/lyl00ling/article/details/80311776
https://github.com/JourWon/httpclientutil
16、最后一个单词长度
https://mp.weixin.qq.com/s/Uh4w5HVZzsZzLTB2ChEcTA
class Solution: def lengthOfLastWord(self, s: str) -> int: s = s.strip(' ') s_list=s.split(' ') return len(s_list [-1])
17、真题+题解(10道——卓越老师·光荣之路)
https://mp.weixin.qq.com/s/8L12tjpt7DHtkzId-Tfzjw