geeksforgeeks
  • Courses
  • Tutorials
  • Interview Prep
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
Similar Topics
Web Technologies32.1K+ articles
DSA20.4K+ articles
Python19.6K+ articles
Experiences15.8K+ articles
Interview Experiences14.5K+ articles
School Learning11.1K+ articles
JavaScript9.9K+ articles
array-range-queries376+ articles
Binary Tree330+ articles
LCA38+ articles

LCA.array-range-queries

2 posts
Find distance between two nodes in the given Binary tree for Q queries
Last Updated: 15 July 2025
Given a binary tree having N nodes and weight of N-1 edges. The distance between two nodes is the sum of the weight of edges on the path between two nodes. Each query cont...read more
article_image
DSA
Binary Tree
LCA.array-range-queries
LCA
Query to find the maximum and minimum weight between two nodes in the given tree using LCA.
Last Updated: 12 July 2025
Given a tree, and the weights of all the node. Each query contains two integers u and v, the task is to find the minimum and maximum weight on the simple path between u an...read more
article_image
DSA
array-range-queries
LCA.array-range-queries
LCA
GeeksforGeeks
location
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
location
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play StoreGFG App on App Store
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Campus Training Program
  • Explore
  • POTD
  • Job-A-Thon
  • Blogs
  • Nation Skill Up
  • Tutorials
  • Programming Languages
  • DSA
  • Web Technology
  • AI, ML & Data Science
  • DevOps
  • CS Core Subjects
  • Interview Preparation
  • Software and Tools
  • Courses
  • ML and Data Science
  • DSA and Placements
  • Web Development
  • Programming Languages
  • DevOps & Cloud
  • GATE
  • Trending Technologies
  • Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
  • Preparation Corner
  • Interview Corner
  • Aptitude
  • Puzzles
  • GfG 160
  • System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved