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. Optimal string joining algorithm
Coding

Optimal string joining algorithm

Filed under Microsoft IDC

The question

Given n strings with varying lengths and a joining function where the time complexity to join two strings is the sum of their lengths, design an optimal algorithm to join all n strings with minimal total time.

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
  • Find immediate right sibling or cousin in a binary tree
  • Check if a linked list is a palindrome without extra space
  • Transform tree nodes to point to parents
โ† Find immediate right sibling or cousin in a binary treeCheck if a linked list is a palindrome without extra space โ†’

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