当前位置:网站首页>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
边栏推荐
- Ffplay realizes user-defined input stream playback
- Heuristic search strategy
- Acwing game 56 [End]
- Gif verification code analysis
- Pseudocode specification, pseudocode online editor,
- 30 sets of report templates necessary for the workplace, meeting 95% of the report needs, and no code is required for one click application
- AVL树的实现
- Vs problems when connecting to SQL myconn OPen(); cannot execute
- What is the experience of being a data product manager in the financial industry
- The Sandbox 与《足球小将》达成合作,将流行的足球漫画及动画带入元宇宙
猜你喜欢
![[veusz] import 2D data in CSV](/img/22/467139f5a83ce9e88a57ced732d4d6.png)
[veusz] import 2D data in CSV

Online JSON to CSharp (c) class tool

Focusing on the industry, enabling customers | release of solutions for the five industries of the cloud container cloud product family

Talk about routing design in service governance

RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check

Vs problems when connecting to SQL myconn OPen(); cannot execute

MIT CMS.300 Session 12 – IDENTITY CONSTRUCTION 虚拟世界中身份认同的建立 part 2

ArcMap批量删除距离较近的点

openni.utils.OpenNIError: (OniStatus.ONI_STATUS_ERROR, b‘DeviceOpen using default: no devices found‘

YGG Spain subdao Ola GG officially established
随机推荐
数学知识:快速幂—快速幂
Focusing on the industry, enabling customers | release of solutions for the five industries of the cloud container cloud product family
深度学习------不同方法实现vgg16
浅析 Open API 设计规范
QT project error: -1: error: cannot run compiler 'clang++' Output:mingw32-make. exe
RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check
HCIP之路第八次实验
帆软堆积图显示占比
Quickly delete the node in the code_ modules
在线文本过滤小于指定长度工具
The sandbox has reached a cooperation with football player to bring popular football cartoons and animation into the metauniverse
Qt 使用QDomDocument读取xml文件
[pyqt5 series] modify the counter to realize control
在线JSON转CSharp(C#)Class工具
2022山东大学软件学院软件项目管理期末考试(回忆版)
Live broadcast review | how can the container transformation of traditional applications be fast and stable?
【Veusz】导入CSV中的二维数据
传智教育 | 项目发布前如何打tag标签及标签命名规范
Basic experiment of data statistics and analysis - basic grammar and operation
[interface automation] software testing the core skills of salary increase to increase salary by 200%