tatoie dardmeladze
tatoie dardmeladze
Explore posts from servers
CC#
Created by tatoie dardmeladze on 6/29/2024 in #help
problem with request
No description
1 replies
CC#
Created by tatoie dardmeladze on 5/8/2024 in #help
✅ arrays addition
public class Solution {
public IList<string> LetterCombinations(string digits) {
Dictionary<char, char[]> phone = new Dictionary<char,char[]>(){
{'2', new char[]{'a','b','c'}},
{'3',new char[]{'d','e','f'}},
{'4',new char[]{'g','h','i'}},
{'5',new char[]{'j','k','l'}},
{'6',new char[]{'m','n','o'}},
{'7',new char[]{'p','q','r','s'}},
{'8',new char[]{'t','u','v'}},
{'9',new char[]{'w','x','y','z'}}};

List<string> combinations = new List<string>();
int length = digits.Length;
if(digits == null || length == 0) return combinations;
for(int i = 0; i < length; i++){
if(length == 1){
foreach (var letter in phone[digits[i]])
{
combinations.Add(letter.ToString());
}
}
for(int k = 0 ; k < length - 1; k++){

for(int j = 0 + k; j < length - 1; j++){
int z = 0;
combinations.add( phone[digits[k][z]] += phone[digits[j][z]]);
z++
if(z == 2) break;
}
}



}
return combinations;
}
}
public class Solution {
public IList<string> LetterCombinations(string digits) {
Dictionary<char, char[]> phone = new Dictionary<char,char[]>(){
{'2', new char[]{'a','b','c'}},
{'3',new char[]{'d','e','f'}},
{'4',new char[]{'g','h','i'}},
{'5',new char[]{'j','k','l'}},
{'6',new char[]{'m','n','o'}},
{'7',new char[]{'p','q','r','s'}},
{'8',new char[]{'t','u','v'}},
{'9',new char[]{'w','x','y','z'}}};

List<string> combinations = new List<string>();
int length = digits.Length;
if(digits == null || length == 0) return combinations;
for(int i = 0; i < length; i++){
if(length == 1){
foreach (var letter in phone[digits[i]])
{
combinations.Add(letter.ToString());
}
}
for(int k = 0 ; k < length - 1; k++){

for(int j = 0 + k; j < length - 1; j++){
int z = 0;
combinations.add( phone[digits[k][z]] += phone[digits[j][z]]);
z++
if(z == 2) break;
}
}



}
return combinations;
}
}
so this is a code I wrote for leet code ik code could be done better but can someone help me at the very bottom of this code error is that I simply cannot add chars from different arrays can someone help me with that
10 replies
CC#
Created by tatoie dardmeladze on 3/25/2024 in #help
how to make space where our data is storaged
hey so I am building little entry level project here is the idea so in windows form I have 3 panel red blue and green the thing is when someone writes something in the green or blue or red panel's textbox it should be sent for other panels for specific label where the text of other would be displayed any ideas how to do that
3 replies