mirror of
https://github.com/krahets/hello-algo.git
synced 2026-11-27 01:12:39 +08:00
Correct and unify doc snippets; fix errors in the demo sources (#2039)
Code snippets in the book are corrected and unified across languages and kept as literal blocks in the snippet files. The demo sources keep their #2033 form, with fixes only for real errors: wrong code, wrong printed labels, comments that contradict the code, and typos. en/ja/ko demos are rendered from the reviewed code dictionaries (krahets/hello-algo-workspace#78). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
53611a0ae9
commit
4fd605c502
@@ -123,13 +123,13 @@ console.log('맨 앞 원소 peekFirst = ' + peekFirst);
|
||||
const peekLast = deque.peekLast();
|
||||
console.log('맨 뒤 원소 peekLast = ' + peekLast);
|
||||
|
||||
/* 큐에 원소 삽입 */
|
||||
/* 원소 삽입 */
|
||||
deque.pushLast(4);
|
||||
console.log('뒤쪽에 원소 4를 삽입한 후 deque = [' + deque.toArray() + ']');
|
||||
deque.pushFirst(1);
|
||||
console.log('앞쪽에 원소 1을 삽입한 후 deque = [' + deque.toArray() + ']');
|
||||
|
||||
/* 큐에서 원소 꺼내기 */
|
||||
/* 원소 꺼내기 */
|
||||
const popLast = deque.popLast();
|
||||
console.log(
|
||||
'맨 뒤에서 꺼낸 원소 = ' +
|
||||
|
||||
Reference in New Issue
Block a user