[DS] Stacks Solution

Minsol·2024년 10월 10일

📖DS

목록 보기
8/14

Problem1 (bracket isValid)

Use stack(s) to check if a string with parentheses is well-formed. (스택을 사용하여 괄호가 포함된 문자열이 올바른 형식인지 확인)

“(3+4)(2+5)” is well-formed.
“((22)*3+1” is not well-formed.
“)(2+2” is not well-formed.

What if we have more than one type of parentheses? (다양한 종류의 괄호가 있다면?)

“{(2+1)(3+2)-22}7” is well-formed.
“{(7+2}*3)” is not well-formed.

Solution

Problem2(Palindrome Linked List)

Solution



역순 연결리스트 만들기

Problem3(퀴즈에 안나옴)

Problem4

Solution

Problem5(퀴즈에 안나옴)

profile
👀

0개의 댓글