Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8579089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:32:18+00:00 2026-06-11T20:32:18+00:00

Wikipedia entry says: Each node has a weight equal to the length of its

  • 0

Wikipedia entry says:

Each node has a “weight” equal to the length of its string plus the sum of all the weights in its left subtree. Thus a node with two children divides the whole string into two parts: the left subtree stores the first part of the string. The right subtree stores the second part and its weight is the sum of the two parts.

I’m a bit confused, it says first that a nodes weight is the length of its string plus the sum of all the weights in its left subtree. Then it says if a node has two children (and thus a left and a right subtree), that the weight is the sum of both parts, and not just the left subtree. Looking at the diagram makes sense (the 9 directly below the 22 is a 9 and not larger because the right child/subtree of 7 does not contribute to the weight) but the phrasing seems off to me or am I misunderstanding something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:32:19+00:00Added an answer on June 11, 2026 at 8:32 pm

    Yeah, the phrasing is off. The “weight” is the partition point, so it only includes the left substring (or the included string, if that’s what you have instead).

    You don’t need to store the total length of a node, but modifying the rope requires that all parent nodes be notified of the change (which should be O(log n), so that’s ok.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

...or are they the same thing? I notice that each has its own Wikipedia
ext3 has 3 journaling options: journal, ordered, and writeback. According to the wikipedia entry
According to the wikipedia entry on Rabin-Karp string matching algorithm, it can be used
In the wikipedia entry Unobtrusive JavaScript there is an example of obtrusive JavaScript: <input
On this Wikipedia entry I found out that ITU Telecommunication Standardization Sector (ITU-T) is
According to this Wikipedia entry on the PNG format , a PNG image file
Wikipedia says: MVC provides front and back ends for the database, the user, and
Wikipedia says the following on A*'s complexity: The time complexity of A* depends on
Wikipedia: Directed Acyclic Graph Not sure if leaf node is still proper terminology since
Wikipedia says: A programming language is a machine-readable artificial language designed to express computations

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.