Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

Блог пользователя govind53

Автор govind53, история, 2 месяца назад, По-английски

Need help with figuring out best possible solution for this problem: There are two strings of same length representing numbers, we can swap the elements at corresponding index in both strings. There exist some integer k such that k swaps results in strings with minimum absolute difference. Task is to find k. Example of one of possible swap: s = "123" and t = "456" -> swap at index 0 makes s = "423" and t = "156" -> abs diff is 267 a possible solution is using back tracking but there should be better solution for this.

A follow-up question, given some k we want to find minimum possible absolute difference after k swaps.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор govind53, история, 3 месяца назад, По-английски

There is a network graph given, in which we need to remove few edges to form at the most k connected components. Resulting graph should have minimum possible bandwidth (by bandwidth we mean maximum number of data packets which can pass through the graph). We need to identify the minimum bandwidth possible. Can someone please suggest possible approach to solve this problem?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится