EsPresso综述:前5种口味
EdPresso shots are a new kind of Espresso shot but, instead of waking your body up with caffeine, they wake your mind up with knowledge. Just like shots of espresso, ËdPresso shots are short and concentrated bits of coding knowledge, organized in an open-access library for developers of all skill levels. The time it takes to read one rarely exceeds four minutes, no matter the difficulty of the topic.
同样,像浓缩咖啡一样,EdPressos具有许多不同的口味,其中一些口味比其他口味更受欢迎。 似乎有五张照片赢得了世界各地的开发人员的青睐。 在本文中,我们将探讨像您这样的开发人员搜索的前5个问题。
1. What is Object-Oriented Programming?
First, we define the difference between classes and objects: "an Object may contain data (fields or variables) or code (methods or procedures). The creation of these objects is based on a programmer-defined blue-print also known as a Class." This shot then breaks down the four basic principles of OOP (Object-oriented programming): inheritance, polymorphism, abstraction, and encapsulation.
由于Java,Smalltalk,Python,Fortran,Eiffel等语言都使用OOP,因此很多开发人员对此快照感到好奇,这在很大程度上是有意义的。
2. What are some basic UNIX commands?
The shot begins with a short definition of a command: is an instruction to the computer, which it interprets to perform a specific task. It then breaks down commands in detail, including Listing Files ls
, Change Directory cd
, Make Directory mkdir
, Remove Film rm
, and Manual man
. Under each command header, there is an explanation of why the command is used and a real-life example that you can compile on the webpage yourself. Learn these basic commands to get started with the command line. For a comprehensive list of UNIX commands, you can visit this Bash cheat sheet.
3. How do you reverse a string in Python?
ñumber 3 beings by defining strings: ordered sequences of character data. In Python, there is no built-in method to reverse a string, but there are three different ways in which strings can be reversed (i.e., Slicing, Loop, and Use join). With Slicing, we simply create a slice that starts with the length of the string, and ends at index 0. With Loop, we create a new array called reversedString[]
and then loop over the list with iterating variable index initialized with the length of the list. With Use join, we use reverse iteration with the reversed( )
built-in function to cycle through the elements in the string in reverse order and then use .join()
method to merge them. If you want to get hands-on practice, take a look at shot and run the code in real-time.
4. How to use switch case statement in Java
首先,我们定义一个开关语句:用于根据所测试的变量的值将控制权转移到特定的代码块。 它们是如果别的 statements. The 开关 is passed a variable, the value of which is compared with each case value. If there is a match, the corresponding block of code is executed.
Ťry this powerful alternative to the if-else statement in real time.
5. Min Heap vs. Max Heap
该快照将最小和最大堆与清晰的视觉效果和应用程序进行了比较。
然后,它分解了每个时间的复杂性。
- 获取最大或最小元素:此操作的时间复杂度为O(1)。删除最大或最小元素:此操作的时间复杂度为O(Log n),因为我们需要在其根节点处维护max / mix,这需要进行Log n运算。插入元素:此操作的时间复杂度为O(Log n),因为我们在树的末尾插入该值并向上遍历以删除最小/最大堆的违反属性。
You can learn more about this topic here.
from: https://dev.to//educative/edpresso-roundup-top-5-flavors-4nkn