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

#include <leetcode.h>

静态 Public 成员函数

static vector< int > grayCode (int n)
 

详细描述

在文件 leetcode.h276 行定义.

成员函数说明

◆ grayCode()

vector< int > leetcode::gray_code::Solution::grayCode ( int  n)
static

在文件 leetcode.cpp615 行定义.

615 {
616 vector<int> ret(1 << n);
617 for(int i = 0; i < ret.size(); i++) {
618 ret[i] = i >> 1 ^ i;
619 }
620 return ret;
621 }

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


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