当前位置:网站首页>Interview questions of a company in a certain month of a certain year (1)
Interview questions of a company in a certain month of a certain year (1)
2022-06-23 07:49:00 【Witty flowers】
One 、 front end

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>yellow</title>
</head>
<style>
#t1 {
background-color: red;
width: 500px;
height: 500px;
text-align: center;
line-height: 50px;
float: left;
}
#t2 {
background-color: rebeccapurple;
width: 300px;
height: 300px;
margin: 100px 100px;
text-align: center;
line-height: 50px;
float: left;
cursor: pointer;
}
#t3 {
background-color: chartreuse;
width: 100px;
height: 100px;
margin: 100px 100px;
text-align: center;
line-height: 260px;
float: left;
cursor: pointer; /* Little hands */
}
</style>
<script src="js/jquery-3.3.1.js"></script>
<script>
// alert(111)
$(function () {
var colorArr = ['rebeccapurple', 'yellow'];
var count = 1;
$("#t2").click(function () {
var $this = $(this);
$this.css('backgroundColor', colorArr[count % 2]);
count++;
})
})
$(function () {
var colorArr = ['chartreuse', 'blue'];
var count = 1;
$("#t3").click(function () {
var $this = $(this);
$this.css('backgroundColor', colorArr[count % 2]);
count++;
})
})
</script>
<body>
<div id="t1">
<div id="t2">
<div id="t3">
Third form
</div>
Second form
</div>
First table
</div>
</body>
</html>
Two 、 Back end

/**
* @Author wang
* @Date 2022/6/19 12:10
* @PackageName:PACKAGE_NAME
* @ClassName: findDifferent
* @Description: TODO 2、 Write a piece of code , Find out several inconsistencies in the following text ( Assuming the same number of words , Consecutive mistakes in words count as one item , There should be 3 Different , Write the code implementation ):
* TODO The same length does not require double for Different lengths require double repetition for
* @Version 1.0
*/
import javax.lang.model.SourceVersion;
import javax.lang.model.element.VariableElement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
/**
* Object oriented thinking has been involved in all aspects of software development . Such as , Object oriented analysis (OOA,Object OrientedAnalysis) , Object oriented design (oOD,Object Oriented
* Design) 、 And what we often call object-oriented programming implementation (OOP,ObjectOriented Programming) .
* <p>
* <p>
* The idea of object-oriented has been designed to all aspects of software development . Such as : Object oriented analysis (OOA,Object OrientedAnalysis) ,
* Design) 、 And what we often call object-oriented programming (OOP,ObjectOriented Programming) .
*/
public class findDifferent {
public static void main(String[] args) {
// oneVoid(); //1- Make a difference
// Scanner sc = new Scanner(System.in);//2- Input string Find the same
// String s1 = sc.nextLine();
// String s2 = sc.nextLine();
// String search = search(s1, s2);
// System.out.println("search = " + search);
}
/**
* The third way Use hashmap
*/
/**
* The second method Use scanner Input list Store value
*/
public static String search(String str1, String str2) {
char[] str1s = str1.toCharArray();
List list = new ArrayList<>();
String temp = "";
for (int i = 0; i < str1s.length; i++) {
if (!list.contains(str1s[i])) {
list.add(str1s[i]);
temp += str1s[i];
}
}
char[] tempChars = temp.toCharArray();
char[] str2Chars = str2.toCharArray();
String tempChar = "";
for (int j = 0; j < temp.length(); j++) {
for (int k = 0; k < str2Chars.length; k++) {
if (tempChars[j] == str2Chars[k]) {
tempChar += tempChars[j];
break;
}
}
}
return tempChar;
}
/**
* The first method
*/
public static void oneVoid() {
String str1 = " Object oriented thinking has been involved in all aspects of software development . Such as , Object oriented analysis (OOA,Object OrientedAnalysis) ,Design) 、 And what we often call object-oriented programming implementation (OOP,ObjectOriented Programming) .";
String str2 = " The idea of object-oriented has been designed to all aspects of software development . Such as : Object oriented analysis (OOA,Object OrientedAnalysis) ,Design) 、 And what we often call object-oriented programming (OOP,ObjectOriented Programming) .";
//1、 First obtain 2 Characters are missing length
int length1 = str1.length();
int length2 = str2.length();
//2、 use SubString Intercept Compare one by one
for (int i = 0; i < length1; i++) {
char c = str1.charAt(i);
char c1 = str2.charAt(i);
if (c != c1) {
System.out.println("c1 = " + c1);
}
}
}
}
3、 ... and 、 Insufficient
In the front question I wrote that there are bug Of Just click on the third div When the second div It will change
In the back end question It can be used HashMap The value of stored value is ( Brother Xu reminded me ) I didn't realize it when I finished
Learning together The big guy passing by gave me some advice
边栏推荐
- Intelligence Education - how to merge codes when code conflicts occur in multi person collaborative development?
- Acwing第 56 场周赛【完结】
- 【Veusz】导入CSV中的二维数据
- Operation on a bit of binary
- Distributed ID generation
- 快速排序 + 冒泡排序 + 插入排序 + 選擇排序
- Unity to wechat applet games
- js中的同步和异步
- Tri rapide + Tri par bulle + Tri par insertion + Tri par sélection
- Abnormal logic reasoning problem of Huawei software test written test
猜你喜欢

EXCEL VBA 入门与实用例子

Heuristic search strategy

Abnormal logic reasoning problem of Huawei software test written test

Online text filter less than specified length tool

AVL树的实现

Playwirght getting started

深度学习------不同方法实现vgg16

这道字符串反转的题目,你能想到更好的方法吗?

Online JSON to CSharp (c) class tool

20bn Jester complete dataset Download
随机推荐
Query on the performance of multi table view in MySQL
基于51单片机的温度检测监测报警系统设计
Quick sort + bubble sort + insert sort + select sort
ArcMap批量删除距离较近的点
某年某月某公司的面试题(1)
RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check
这道字符串反转的题目,你能想到更好的方法吗?
The original cloud landed in deep water, and the cloud product family of Boyun container released four values
Unity picture loading and saving
Minio single node deployment Minio distributed deployment fool deployment process (I)
js中的同步和异步
NFS 特别注意权限的问题
20bn Jester complete dataset Download
【星球精选】如何高效构建 Roam 与 theBrain 间细粒度双向链接?
Console Application
【markdown】markdown 教程大归纳
Online JSON to CSharp (c) class tool
[markdown] markdown tutorial summary
Ntu-rgbd data set download and data format analysis
在kubernetes中部署kubersphere