JobsJob TrackerJob alerts

Microsoft IDC ยท 8 questions

All 8Coding 8
  • Find first non-repeating character in a stringCoding
  • Reverse a linked list in groups of size kCoding
  • Trim a Binary Search Tree within a given rangeCoding
  • Replace specific character with double charactersCoding
  • Find immediate right sibling or cousin in a binary treeCoding
  • Optimal string joining algorithmCoding
  • Check if a linked list is a palindrome without extra spaceCoding
  • Transform tree nodes to point to parentsCoding
โ† Microsoft IDC questions
  1. Interview questions
  2. Microsoft IDC
  3. Find immediate right sibling or cousin in a binary tree
Coding

Find immediate right sibling or cousin in a binary tree

Filed under Microsoft IDC

The question

Given a binary tree where nodes contain a pointer to their parent, find the immediate right sibling or cousin of a given node.

No write-up yet. Related questions below have one.

Related Microsoft IDC questions

  • Trim a Binary Search Tree within a given range
  • Replace specific character with double characters
  • Optimal string joining algorithm
  • Check if a linked list is a palindrome without extra space
  • Transform tree nodes to point to parents
โ† Replace specific character with double charactersOptimal string joining algorithm โ†’

Collected from public candidate posts and coding forums. Updated Nov 2026.