{"id":22513852,"url":"https://github.com/emahtab/excel-sheet-column-number","last_synced_at":"2026-01-06T23:08:29.157Z","repository":{"id":79525468,"uuid":"258293004","full_name":"eMahtab/excel-sheet-column-number","owner":"eMahtab","description":"Find the excel sheet column number","archived":false,"fork":false,"pushed_at":"2020-04-23T18:18:52.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T03:25:38.515Z","etag":null,"topics":["leetcode","maths","maths-problem","problem-solving"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eMahtab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-23T18:17:09.000Z","updated_at":"2020-04-23T18:19:57.000Z","dependencies_parsed_at":"2023-05-10T17:15:53.823Z","dependency_job_id":null,"html_url":"https://github.com/eMahtab/excel-sheet-column-number","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fexcel-sheet-column-number","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fexcel-sheet-column-number/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fexcel-sheet-column-number/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fexcel-sheet-column-number/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eMahtab","download_url":"https://codeload.github.com/eMahtab/excel-sheet-column-number/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245952115,"owners_count":20699428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["leetcode","maths","maths-problem","problem-solving"],"created_at":"2024-12-07T03:14:43.678Z","updated_at":"2026-01-06T23:08:29.081Z","avatar_url":"https://github.com/eMahtab.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Excel Sheet Column Number\n## https://leetcode.com/problems/excel-sheet-column-number\n\nGiven a column title as appear in an Excel sheet, return its corresponding column number.\n\nFor example:\n\n    A -\u003e 1\n    B -\u003e 2\n    C -\u003e 3\n    ...\n    Z -\u003e 26\n    AA -\u003e 27\n    AB -\u003e 28 \n    ...\n```    \nExample 1:\n\nInput: \"A\"\nOutput: 1\n\nExample 2:\n\nInput: \"AB\"\nOutput: 28\n\nExample 3:\n\nInput: \"ZY\"\nOutput: 701\n```\n\n# Implementation :\n\n```java\nclass Solution {\n    public int titleToNumber(String s) {\n        if(s == null || s.length() == 0)\n            return 0;\n        int column = 0;\n        int unit = 0;\n        for(int i = s.length()-1; i \u003e= 0; i--) {\n            char ch = s.charAt(i);\n            int value = (ch - 'A') + 1; \n            int pos = (int) Math.pow(26, unit);\n            column = column + (pos * value);\n            unit++;\n        }\n        return column;\n    }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femahtab%2Fexcel-sheet-column-number","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femahtab%2Fexcel-sheet-column-number","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femahtab%2Fexcel-sheet-column-number/lists"}