Skip to content

Commit e9417ca

Browse files
committed
Minor docu corrections.
1 parent cdfe478 commit e9417ca

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

fun_with_algos/mean_rank_count.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
#ifndef MEAN_RANK_COUNT_H
66
#define MEAN_RANK_COUNT_H
77

8-
// There is a scholaship test on an education platform.
8+
// There is a scholarship test on an education platform.
99
// There are n students with roll numbers 1, 2, ..., n who appeared for the test, where the rank secured by
1010
// the ith student is denoted by rank[i]. Thus, the array rank is a permutation of length n .
1111
// Groups can only be formed with students having consecutive roll numbers, in other words, a subarray of the
1212
// original array. For each value x (1 <= x <= n), find the number of groups that can be formed such that
1313
// they have a mean rank equal to x.
1414
//
15-
// More formally, given a permutaion of length n, find the number of subarrays of the given array having a mean
16-
// value equal to x , for each x in the range [1, n] .
15+
// More formally, given a permutation of length n, find the number of subarrays for the given array having a mean
16+
// value equal to x, for each x in the range [1, n].
1717
//
1818
// Notes
1919
//
20-
// The mean value of an array of k elements is defined as the sum of elements divided by k.
21-
// A permutation of leangth n is a sequence where each number from q to n appears exactly once.
20+
// The mean value of an array with k elements is defined as the sum of elements divided by k.
21+
// A permutation of length n is a sequence where each number from q to n appears exactly once.
2222
// A subarray of an array is a contiguous section of the array.
2323

2424

fun_with_algos/min_cost_to_add_roads.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#define MIN_COST_TO_ADD_ROADS_H
77
// There are N cities numbered from 1 to N.
88
// You are given connections, where each connections[i] = [city1, city2, cost] represents the cost to
9-
// connect city1 and city2together. (A connection is bidirectional: connecting city1 and city2 is the same as connecting city2 and city1.)
9+
// connect city1 and city2. (A connection is bidirectional: connecting city1 and city2 is the same as connecting city2 and city1.)
1010
// Return the minimum cost so that for every pair of cities, there exists a path of connections
1111
// (possibly of length 1) that connects those two cities together. The cost is the sum of the connection costs used.
1212
// If the task is impossible, return -1.

0 commit comments

Comments
 (0)