HackerRank C++ Solution - Simple Text Editor

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ก.ย. 2024
  • I JustWriteTheCode of the solution to the "Simple Text Editor" problem present on HackerRank (1 Week Preparation Kit - Day 6).
    Programming Language: C++.
    Problem:
    Implement a simple text editor. The editor initially contains an empty string, S. Perform Q operations of the following 4 types:
    1. append(W) - Append string W to the end of S.
    2. delete(k) - Delete the last k characters of S.
    3. print(k) - Print the k-th character of S.
    4. undo() - Undo the last (not previously undone) operation of type 1 or 2, reverting S to the state it was in prior to that operation.

ความคิดเห็น • 1

  • @harryl2757
    @harryl2757 5 หลายเดือนก่อน

    why does for loop condition is (....; i