docs-isharkfly-com/algorithm/lambda-evens-lambda.md

27 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Lambda EvensLambda 偶数)
> 🔔 参与讨论https://www.isharkfly.com/t/lambda-evens-lambda/317
## 英文题目
题目的英文表述成参考:
![lambda-evens|690x337](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/optimized/2X/7/7cd0f6ebda4cef2d5ac1342d6cdce236777689d7_2_690x337.png)
## 中文描述
题目要求比较简单,使用 Lambda 表达式写一个函数,找到给出字符串中的偶数。
## 思路点评
你需要对 Lambda 表达式比较熟悉,需要知道 Lambda 是什么。在 Java 世界中Lambda 是在 Java 8 中引进的一个表达式。属于函数式。
近来也用得越来越多,最好对 Lambda 有所了解。
同时你还要有基本的Java 字符拆分 API 的了解。很多题目可能不能允许你用第三方 API所以你需要了解 String.split 有关的算法。
## 源代码
源代码和有关代码的更新请访问 GitHub
https://github.com/cwiki-us/codebank-algorithm/blob/master/src/test/java/com/ossez/codebank/interview/tests/others/LambdaEvensTest.java