Skip to main content
Zephyr's user avatar
Zephyr's user avatar
Zephyr's user avatar
Zephyr
  • Member for 7 years, 7 months
  • Last seen this week
  • Malaysia
awarded
revised
Reverse Dictionary: Group from child array elements and get its minimum key
Update code snippet with comments and description
Loading…
revised
Loading…
Loading…
awarded
accepted
comment
Generate Braille characters from a dictionary
This is an off-topic question: Your helper method looks really cool to me! May I know why I couldn't print the function name using your method by calling action.Method.Name?
comment
Generate Braille characters from a dictionary
@Paparazzi Thank you for showing another approach in solving this problem. It takes me some time to figure out what you did there, interesting base 2 manipulation!
comment
Generate Braille characters from a dictionary
@Paparazzi yes you're right! I should read more about etiquettes in meta.
awarded
comment
Generate Braille characters from a dictionary
Well found out it's my mistake for ignoring a newline after indented code line during editing. The idea of skipping extraneous call by using Queue seems to be overcomplicating the problem and "oversmart". Your "bit switching" strategy nailed it!
awarded
revised
Generate Braille characters from a dictionary
added test case as suggested by moderator
Loading…
comment
Generate Braille characters from a dictionary
Yes you're right! In most situation the straightforward way would be initialize the dictionary with "translated" string instead of integer array. I'm trying to learn different approaches whereby the storage is a constraint in this case by only storing active bits. Thanks again for clearing my doubt!
awarded
comment
Generate Braille characters from a dictionary
Wow that's a great insight from you and thanks for sharing your knowledge! I've tried to perform edit but unfortunately keep getting error about code formatting issue although I've make sure all the code line starts with 4 space in Notepad++. Anyway thanks again!
comment
Generate Braille characters from a dictionary
Alright I'll update the question in few minutes. Thanks for the feedback @t3chb0t!
comment
Generate Braille characters from a dictionary
I'm using StopWatch in the main class to keep track the elapse time with 100k iterations. Should I include it in the question too?
awarded