当前位置:网站首页>How do I check swift if two arrays contain the same elements, regardless of the order in which they appear?
How do I check swift if two arrays contain the same elements, regardless of the order in which they appear?
2022-06-25 06:24:00 【Bustling city 】
problem :
Let's say there are two arrays... Let's say there are two arrays ...
var array1 = ["a", "b", "c"]var array2 = ["b", "c", "a"]I'd like the result of the comparison of these two arrays to be true, and the following... I hope the comparison between these two arrays is true , following ...
var array1 = ["a", "b", "c"]var array2 = ["b", "c", "a", "d"]...to be false.…… fake .How can I achieve that in Swift? How can I be in Swift To achieve this ?I tried to convert both arrays to sets but for some reason Set() keeps removing some (usually duplicated) objects that the array contains. I tried to convert two arrays into collections , But for some reason Set() Keep deleting some of the... Contained in the array ( Usually repeated ) object .
Any help would be appreciated. Any help will be appreciated .
Solution :
Reference resources : https://stackoom.com/en/question/2U37i边栏推荐
- Forecast report on output demand and supply scale of global and Chinese structural ceramics market for semiconductor equipment (2022 Edition)
- Talk about TCP and UDP
- Digitalization, transformation?
- Guess the size of the number
- Global and China financial guarantee marketing strategy and channel dynamic construction report 2022
- No one reads the series. Source code analysis of copyonwritearraylist
- What is the slice flag bit
- How to use asemi FET 7n80 and how to use 7n80
- Day21 JMeter usage basis
- Gb28181 protocol -- timing
猜你喜欢

MySQL tuning -- 02 -- slow query log

Pre knowledge of asynchronous operation

Laravel8+ wechat applet generates QR code

Socket, network model notes

Es11 new methods: dynamic import(), bigint, globalthis, optional chain, and null value merging operator
![[short time average zero crossing rate] short time average zero crossing rate of speech signal based on MATLAB [including Matlab source code 1721]](/img/4a/304f262c1c08800aa95f9e2d537e4d.jpg)
[short time average zero crossing rate] short time average zero crossing rate of speech signal based on MATLAB [including Matlab source code 1721]

JS dynamic table creation

@Detailed explanation of valid annotation usage

3-7sql injection website instance step 3: attack type and attack strategy

Day21 performance test process
随机推荐
How often should you refactor- How often should you refactor?
Is it safe to open a stock account on the Internet in Beijing?
[Suanli network] technological innovation of Suanli Network -- Key Technologies of green and security
Mongodb basic concept learning - set
What does cardinality mean in set
Handling skills of SQL optimization (2)
General test point ideas are summarized and shared, which can be directly used in interview and actual software testing
Data7202 statistical analysis
Analysis report on production and sales demand and sales prospect of global and Chinese phosphating solution Market 2022-2028
Report on the application prospect and investment potential of global and Chinese cell therapy industry 2022-2028
No one reads the series. Source code analysis of copyonwritearraylist
Brief introduction and use of JSON
Echo command – output a string or extract the value of a shell variable
Forecast report on output demand and supply scale of global and Chinese structural ceramics market for semiconductor equipment (2022 Edition)
Arm instructions and others
Aviator an expression evaluation engine
Summary of 6 common methods of visual deep learning model architecture
JS to realize the encapsulation of the function of obtaining the mouse click position
Global and China chemical mechanical polishing abrasive materials market demand outlook and investment scale forecast report 2022 Edition
Digitalization, transformation?