MCPcopy Create free account
hub / github.com/Hsinha11/Leetcode-solutions / addSpaces

Method addSpaces

-68-Text_Justification/Code.cpp:6–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4class Solution {
5public:
6 void addSpaces(string &str, int count) {
7 for (int i = 0; i < count; i++)
8 str.push_back(' ');
9 }
10
11 vector<string> fullJustify(vector<string>& words, int maxWidth) {
12 vector<string> ans;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected