What is the corresponding UCS2 code?

  • Thread starter Thread starter Franco
  • Start date Start date
  • Tags Tags
    Code
Click For Summary
The discussion revolves around two main questions related to computer science concepts. The first question addresses the conversion of a UTF-8 byte sequence (23 E8 96 BC C2 8B) to its corresponding UCS2 code in hexadecimal. The user expresses confusion about UTF-8 and UCS2, indicating a lack of clarity in their lecture notes.The second question involves analyzing the performance of a recursive method using big-Oh notation. The user initially suggests that the complexity is O(n/10) but later questions this reasoning, pointing out that for n=1000, the method runs three times before reaching a base case. This indicates a misunderstanding of how to express the complexity, as the correct analysis would consider the logarithmic nature of the recursion, leading to a complexity of O(log n) instead. The discussion also includes links to resources for further understanding of UTF-8 and UCS2, highlighting the importance of external references in grasping these concepts.
Franco
Messages
12
Reaction score
0
i was preparing for my compsci exam doing past papers
and encountered a few questions i don't get
can someone help me please?

The following bytes are encountered in a UTF8 stream. What is the corresponding UCS2 code? (Express your answer in hexadecimal)
23 E8 96 BC C2 8B

i don't know wat's UTF8 and UCS2, can't find it in my lecture notes


another question
Express the performance of the following methods using big-Oh notation in terms of the parameter n. Give reasons for your answers.

public void determineComplexity(int n) {
int add = 0;
if (n ==0)
add++
else{
determineComplexity(n/10);
}
}

for this one, is the answer equals
O(n/10)?
if n = 1000
it'll take 3 times before n == 0
 
Computer science news on Phys.org
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K