logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    mr.ricklu
    Mar 02, 2021
      ·  Edited: Mar 07, 2021

    02/28 Homework: Review for contest #3

    in CS Fundamentals for ACSL

    Boolean algebra:

    Simplify these expressions:

    How many inputs are true for the following expressions?



    Answers:

    !ABC

    B!D + A!BC

    B!C + AB

    BC + !A!B!C

    3

    15

    4


    Data Structures:

    What is popped next in this queue?

    PUSH(D), PUSH(F), POP(X), PUSH(G), POP(X), POP(X), PUSH(H), PUSH(J), PUSH(K), POP(X), PUSH(Q), POP(X), PUSH(Q), PUSH(W), POP(X), POP(X), PUSH(Q), PUSH(Q), POP(X), PUSH(Q), PUSH(Y), POP(X), PUSH(C), POP(X), PUSH(T), PUSH(A), POP(X), POP(X), PUSH(J), POP(X)


    PUSH(A), POP(X), PUSH(G), PUSH(U), PUSH(B), PUSH(X), POP(X), POP(X), PUSH(X), PUSH(L), POP(X), PUSH(P), POP(X), PUSH(S), PUSH(R), POP(X), POP(X), PUSH(R), PUSH(R), PUSH(H), POP(X), PUSH(N), PUSH(Z), PUSH(U), POP(X), POP(X), POP(X), PUSH(W), PUSH(E)


    What is popped next in this stack?

    PUSH(D), PUSH(F), POP(X), PUSH(G), POP(X), POP(X), PUSH(H), PUSH(J), PUSH(K), POP(X), PUSH(Q), POP(X), PUSH(Q), PUSH(W), POP(X), POP(X), PUSH(Q), PUSH(Q), POP(X), PUSH(Q), PUSH(Y), POP(X), PUSH(C), POP(X), PUSH(T), PUSH(A), POP(X), POP(X), PUSH(J), POP(X)


    PUSH(A), POP(X), PUSH(G), PUSH(U), PUSH(B), PUSH(X), POP(X), POP(X), PUSH(X), PUSH(L), POP(X), PUSH(P), POP(X), PUSH(S), PUSH(R), POP(X), POP(X), PUSH(R), PUSH(R), PUSH(H), POP(X), PUSH(N), PUSH(Z), PUSH(U), POP(X), POP(X), POP(X), PUSH(W), PUSH(E)


    What is the depth of these binary trees?

    NOTEBOOK

    HONOLULU

    MARIACHI

    MYNAMEJEF

    Answers:

    C

    R

    Q

    E

    3

    4

    5

    5


    0 comments
    0
    0 comments

    Questions? Email us at legionoflearners@gmail.com or join our WeChat group!

    • lol-101dotcom

    ©2020 Legion of Learners