problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
leetcode::cells_in_a_range_on_an_excel_sheet::Solution类 参考

#include <leetcode.h>

静态 Public 成员函数

static vector< string > cellsInRange (const string &s)
 

详细描述

在文件 leetcode.h1524 行定义.

成员函数说明

◆ cellsInRange()

vector< string > leetcode::cells_in_a_range_on_an_excel_sheet::Solution::cellsInRange ( const string &  s)
static

在文件 leetcode.cpp3924 行定义.

3924 {
3925 vector<string> ans;
3926 istringstream ss(s);
3927 char col1;
3928 char col2;
3929 int row1;
3930 int row2;
3931 ss >> col1 >> row1;
3932 ss.get();
3933 ss >> col2 >> row2;
3934 for(char col = col1; col <= col2; col++) {
3935 for(int row = row1; row <= row2; row++) {
3936 ostringstream oss;
3937 oss << col << row;
3938 ans.push_back(oss.str());
3939 }
3940 }
3941 return ans;
3942 }

被这些函数引用 leetcode::cells_in_a_range_on_an_excel_sheet::TEST().


该类的文档由以下文件生成: