60 questions
def binary_search(array, goal): low = 0 high = len(array) - 1 while low <= high: mid = (low + high) // 2 if goal > array[mid]: low = mid + 1 elif goal < array[mid]: high = mid - 1 else:...
Do I need to put @Override when implementing the method of the interface? Read about @Override in the Java document.@Override indicates that when defining a method, it overrides a higher-class method....
I'm changing the C++ algorithm to C#, and I saw a for statement like this. for (u = b.size(), v = b.back(); u--; v = p[v]) b[u] = v;Errors appear on C# and work well on C++.I don't know what this repe...
for i in range(10): print(i) if i == 9: print(Too big - I'm giving up!) break;else: print(Completed successfully)I don't know why you use else when you have a code like this.At first, I thought the ...
I usually speak C language, and sometimes I don't understand Python because it's a habit.What do self and _init__ do in the functions below?Is there any reason why you have to write it down?I think it...
I know the friend declarationI've never used it beforeI don't know when to use it.If you think about the encapsulation of OOP,Isn't friend an exceptional function?
If the developer is alone or a minority, the development will proceed without a DBA.I have been designing and developing DB first, and this method is subject to ever-changing requirements
public class Test{ private String[] arr = new String[]{1,2}; public String[] getArr() { return arr; }}When there's a code like this
Is there a way to call a member function of a parent class in a child class?How can I implement call_print_in_Base below?class Base{public: void print() { cout << i'm base! << endl; }};cla...
When someone asked me what polymorphism is...Can overloading or overriding be the answer to that?I think polymorphism needs to be added more than that. The one defined without the implementation of th...
« | - 3 - | » |
© 2024 OneMinuteCode. All rights reserved.