<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 3nginuity</title>
    <description>The latest articles on DEV Community by 3nginuity (@3nginuity).</description>
    <link>https://dev.to/3nginuity</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1840088%2F68758dfa-68fc-4bbc-a173-ec5da6a5232e.JPG</url>
      <title>DEV Community: 3nginuity</title>
      <link>https://dev.to/3nginuity</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/3nginuity"/>
    <language>en</language>
    <item>
      <title>Como resolver el Problema 5 (Nivel Basico Concurso de Programación CUVALLES 2024B)</title>
      <dc:creator>3nginuity</dc:creator>
      <pubDate>Thu, 06 Feb 2025 22:19:22 +0000</pubDate>
      <link>https://dev.to/3nginuity/como-resolver-el-problema-5-nivel-basico-concurso-de-programacion-cuvalles-2024b-3p37</link>
      <guid>https://dev.to/3nginuity/como-resolver-el-problema-5-nivel-basico-concurso-de-programacion-cuvalles-2024b-3p37</guid>
      <description>&lt;h3&gt;
  
  
  Problema
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problema 5 (Nivel Basico Concurso de Programación CUVALLES 2024B)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Palabras Cortas (Autor: Jorge Ernesto Castillo Rizo)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Escribe un programa que identifique y cuente las palabras de &lt;strong&gt;3 caracteres o menos en un texto dado (S)&lt;/strong&gt; por el usuario. Ignora mayúsculas, minúsculas y signos de puntuación, y devuelve la cantidad total de palabras cortas encontradas.&lt;br&gt;
Nota: Todos los caracteres en S denotan valores de la Aa - Zz.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Entrada:&lt;/strong&gt; Una línea de texto.&lt;br&gt;
&lt;strong&gt;Salida:&lt;/strong&gt; Un número que representa la cantidad total de palabras con 3 caracteres o menos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ejemplo:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Entrada:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; El sol se oculta en el horizonte, y la noche llega.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Salida:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Explicación de la Solución
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Comprender el Problema&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;El objetivo es contar &lt;strong&gt;cuántas palabras&lt;/strong&gt; dentro de una frase tienen &lt;strong&gt;3 caracteres o menos&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Entrada:&lt;/strong&gt; Un texto con palabras separadas por espacios.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Salida:&lt;/strong&gt; Un número que representa la cantidad de palabras cortas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restricciones:&lt;/strong&gt; No se deben considerar signos de puntuación y las mayúsculas/minúsculas no afectan el conteo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ejemplo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Entrada:  "El sol se oculta en el horizonte, y la noche llega."
Salida:    7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;strong&gt;2. Identificar los Pasos para Resolverlo&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Para llegar a la solución, descomponemos el problema en pasos más pequeños:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Eliminar los signos de puntuación&lt;/strong&gt; → Porque el problema indica que deben ignorarse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dividir el texto en palabras&lt;/strong&gt; → Para analizar una por una.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contar cuántas palabras tienen 3 caracteres o menos&lt;/strong&gt; → Usamos un contador.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Imprimir el resultado&lt;/strong&gt; → Mostramos la cantidad total de palabras cortas.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;3. Diseño de la Solución (Paso a Paso)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;1️⃣ &lt;strong&gt;Preprocesar el texto:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Eliminar signos de puntuación.
&lt;/li&gt;
&lt;li&gt;No es necesario convertir a minúsculas porque no afecta el conteo.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2️⃣ &lt;strong&gt;Dividir la frase en palabras:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Usamos el espacio como separador.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3️⃣ &lt;strong&gt;Recorrer cada palabra y contar las que cumplan la condición:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Si una palabra tiene 3 caracteres o menos, sumamos 1 al contador.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4️⃣ &lt;strong&gt;Mostrar el resultado final:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Imprimir el valor del contador.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;📝 Código en Python&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Define una función llamada solution que recibe una lista de palabras
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Inicializa un contador en 0
&lt;/span&gt;    &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="c1"&gt;# Itera sobre cada palabra en la lista de palabras
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;word&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Limpia la palabra: crea una nueva cadena solo con caracteres alfanuméricos
&lt;/span&gt;        &lt;span class="c1"&gt;# join: une todos los caracteres que cumplen la condición isalnum()
&lt;/span&gt;        &lt;span class="n"&gt;clean_word&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;char&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;char&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;word&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;char&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isalnum&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="c1"&gt;# Verifica si la palabra limpia tiene 3 o menos caracteres y no está vacía
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;clean_word&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;clean_word&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
            &lt;span class="c1"&gt;# Incrementa el contador si se cumple la condición
&lt;/span&gt;            &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="c1"&gt;# Devuelve el total de palabras que cumplen con el criterio
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;

&lt;span class="c1"&gt;# Lee una línea de entrada y la divide en palabras
&lt;/span&gt;&lt;span class="n"&gt;words&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="c1"&gt;# Imprime el resultado de llamar a la función solution con las palabras
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  &lt;strong&gt;💡 Complejidad del Algoritmo&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;La solución tiene una complejidad de &lt;strong&gt;O(n)&lt;/strong&gt;, donde &lt;code&gt;n&lt;/code&gt; es el número de palabras en la frase. Esto se debe a que:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;La limpieza del texto es &lt;strong&gt;O(m)&lt;/strong&gt;, donde &lt;code&gt;m&lt;/code&gt; es el tamaño del string.&lt;/li&gt;
&lt;li&gt;La división en palabras es &lt;strong&gt;O(n)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;El recorrido de la lista de palabras y el conteo es &lt;strong&gt;O(n)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;En total, la solución sigue una complejidad lineal &lt;strong&gt;O(n + m)&lt;/strong&gt;, lo cual es eficiente para este problema.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://github.com/Club-Algoritmia-CUValles/Reto-0" rel="noopener noreferrer"&gt;Link al repositorio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>competativeprogramming</category>
      <category>spanish</category>
      <category>learning</category>
      <category>coding</category>
    </item>
    <item>
      <title>Más Allá del Código: La Importancia de la Resolución de Problemas para Destacar como Programador</title>
      <dc:creator>3nginuity</dc:creator>
      <pubDate>Mon, 13 Jan 2025 23:02:21 +0000</pubDate>
      <link>https://dev.to/3nginuity/mas-alla-del-codigo-la-importancia-de-la-resolucion-de-problemas-para-destacar-como-programador-3f7m</link>
      <guid>https://dev.to/3nginuity/mas-alla-del-codigo-la-importancia-de-la-resolucion-de-problemas-para-destacar-como-programador-3f7m</guid>
      <description>&lt;p&gt;La programación no se trata solo de escribir líneas de código; se trata de resolver problemas. Mientras muchos desarrolladores principiantes se sumergen de lleno en aprender un lenguaje de programación, a menudo pasan por alto una habilidad crucial que es la base del éxito en este campo: la &lt;strong&gt;resolución de problemas.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;La &lt;strong&gt;resolución de problemas&lt;/strong&gt; es el pilar fundamental de la programación. Es la capacidad de pensar críticamente, descomponer desafíos complejos y crear soluciones que no solo funcionen, sino que sean eficientes y escalables. Sin estas habilidades, incluso el programador más competente puede enfrentarse a dificultades al abordar tareas de desarrollo de software del mundo real.&lt;/p&gt;

&lt;p&gt;En este artículo, compartiré mi perspectiva sobre la importancia de la resolución de problemas en la programación, las estrategias clave para abordar desafíos y un ejemplo práctico para poner estos conceptos en contexto.&lt;/p&gt;




&lt;h3&gt;
  
  
  Por Qué la Resolución de Problemas Importa Más que la Sintaxis
&lt;/h3&gt;

&lt;p&gt;Cuando comencé a aprender a programar, cometí el mismo error que muchos principiantes: centrarme exclusivamente en la sintaxis de un lenguaje. Pensé que dominar Python, JavaScript o C++ me convertiría en un gran programador. Sin embargo, pronto me di cuenta de que, sin la habilidad de entender y resolver problemas, conocer un lenguaje era como tener una herramienta sin saber cómo usarla.&lt;/p&gt;

&lt;p&gt;La &lt;strong&gt;resolución de problemas&lt;/strong&gt; no es solo una habilidad técnica; es una mentalidad. Se trata de pensar creativamente, aceptar desafíos y ser persistente cuando las soluciones no son evidentes de inmediato. Esta habilidad te permite adaptarte a diferentes tecnologías y herramientas, haciéndote más versátil y valioso como programador.&lt;/p&gt;




&lt;h3&gt;
  
  
  Pasos Clave para Resolver un Problema de Programación
&lt;/h3&gt;

&lt;p&gt;Resolver un problema de programación puede parecer abrumador al principio, pero dividirlo en pasos manejables marca la diferencia.&lt;br&gt;
Este es el enfoque que utilizo:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Entender el Problema&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dedica tiempo a leer y comprender completamente la descripción del problema.&lt;/li&gt;
&lt;li&gt;Identifica las entradas, salidas y restricciones.&lt;/li&gt;
&lt;li&gt;Pregúntate: ¿Qué me está pidiendo realmente este problema?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Dividir el Problema&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Divide el problema en partes más pequeñas y manejables.&lt;/li&gt;
&lt;li&gt;Aborda cada parte paso a paso, en lugar de intentar resolverlo todo de una vez.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Elegir una Estrategia&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Piensa en los enfoques posibles: fuerza bruta, recursión o programación dinámica, por ejemplo.&lt;/li&gt;
&lt;li&gt;Evalúa los pros y contras de cada enfoque.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Escribir Pseudocódigo&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Esboza tu solución en lenguaje natural o pseudocódigo antes de comenzar a programar.&lt;/li&gt;
&lt;li&gt;Esto te ayuda a clarificar la lógica y evitar errores innecesarios.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Codificar y Probar&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Escribe tu solución, manteniendo el código limpio y modular.&lt;/li&gt;
&lt;li&gt;Prueba tu código con diferentes entradas para asegurarte de que funcione en todos los casos, incluidos los extremos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Refactorizar y Optimizar&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Revisa tu solución en busca de mejoras.&lt;/li&gt;
&lt;li&gt;Optimiza la eficiencia en términos de tiempo y espacio.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Ejemplo: Resolviendo un Problema
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problema:&lt;/strong&gt;&lt;br&gt;
Un cajero automático solo puede dispensar billetes en denominaciones de $50 y $20. Se te pide determinar si es posible retirar una cantidad exacta usando estas denominaciones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ejemplos:&lt;/strong&gt;&lt;br&gt;
Monto: $130 → Sí (2 × $50 + 1 × $20)&lt;br&gt;
Monto: $125 → No&lt;/p&gt;

&lt;h3&gt;
  
  
  Solución Paso a Paso:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Entender el Problema&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Entrada&lt;/strong&gt;: Un número entero que representa el monto.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Salida&lt;/strong&gt;: Un booleano indicando si el monto puede formarse usando billetes de $50 y $20.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restricciones&lt;/strong&gt;: El monto debe ser no negativo y divisible por las denominaciones disponibles.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Descomponer el Problema&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Usar la ecuación: Sea &lt;code&gt;x&lt;/code&gt; el número de billetes de $50 y &lt;code&gt;y&lt;/code&gt;el número de billetes de $20. Verificar si &lt;code&gt;50x+20y=monto&lt;/code&gt; y tiene una solución donde &lt;code&gt;x&lt;/code&gt; y &lt;code&gt;y&lt;/code&gt; son enteros no negativos.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Simplificar el Problema&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Si el monto es divisible por 10, podría ser posible formarlo con billetes de $50 y $20.&lt;/li&gt;
&lt;li&gt;Además, verifica si el residuo al dividir entre 50 puede expresarse con billetes de $20.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pseudocódigo&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Función puede_retirar(monto):
    Si el monto no es divisible por 10:
        Retornar Falso
    Para x en rango(0, monto // 50 + 1):
        Residuo = monto - 50 * x
        Si Residuo % 20 == 0:
            Retornar Verdadero
    Retornar Falso
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Código en Python&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def puede_retirar(monto):
    if monto % 10 != 0:  # Solo montos divisibles entre 10 son válidos
        return False
    for x in range(monto // 50 + 1):  # Probar todas las combinaciones posibles de billetes de $50
        residuo = monto - 50 * x
        if residuo % 20 == 0:
            return True
    return False

# Ejemplos
print(puede_retirar(130))  # Salida: True
print(puede_retirar(125))  # Salida: False
print(puede_retirar(70))   # Salida: True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Mi Perspectiva: La Resolución de Problemas es un Viaje de por Vida
&lt;/h3&gt;

&lt;p&gt;La resolución de problemas no es algo que se domine de la noche a la mañana. He enfrentado innumerables momentos en los que me sentí atrapado y frustrado. Sin embargo, con el tiempo, aprendí que la persistencia, la curiosidad y el deseo de aprender son las claves del crecimiento. Cada problema que resuelves fortalece tu confianza y agudiza tus habilidades, preparándote para retos aún mayores.&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusión
&lt;/h3&gt;

&lt;p&gt;La programación es mucho más que escribir código; se trata de pensar críticamente y resolver problemas de forma creativa. Al centrarte en desarrollar tus habilidades de resolución de problemas, no solo te convertirás en un mejor programador, sino que también te dotarás de una mentalidad capaz de enfrentar desafíos en cualquier área de la vida.&lt;/p&gt;

&lt;p&gt;La próxima vez que te enfrentes a un problema difícil, da un paso atrás, divídelo y abórdalo de manera metódica. Te sorprenderá lo que puedes lograr.&lt;/p&gt;

&lt;p&gt;Unete a mi newsletter:&lt;a href="https://3nginuity.substack.com/subscribe" rel="noopener noreferrer"&gt;https://3nginuity.substack.com/subscribe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Referencias&lt;/strong&gt;:&lt;br&gt;
&lt;a href="https://www.simplilearn.com/tutorials/programming-tutorial/problem-solving-in-programming" rel="noopener noreferrer"&gt;https://www.simplilearn.com/tutorials/programming-tutorial/problem-solving-in-programming&lt;/a&gt;&lt;br&gt;
&lt;a href="https://arc.dev/talent-blog/problem-solving-skills/" rel="noopener noreferrer"&gt;https://arc.dev/talent-blog/problem-solving-skills/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>spanish</category>
      <category>programming</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Beyond Code: Why Problem-Solving Skills Are Essential for Programmers</title>
      <dc:creator>3nginuity</dc:creator>
      <pubDate>Sat, 11 Jan 2025 03:07:40 +0000</pubDate>
      <link>https://dev.to/3nginuity/beyond-code-why-problem-solving-skills-are-essential-for-programmers-14n</link>
      <guid>https://dev.to/3nginuity/beyond-code-why-problem-solving-skills-are-essential-for-programmers-14n</guid>
      <description>&lt;p&gt;Programming isn’t just about writing lines of code; it’s about solving problems. While many aspiring developers dive headfirst into learning a programming language, they often overlook a crucial skill that underpins success in this field: &lt;strong&gt;problem-solving&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem-solving&lt;/strong&gt; is the cornerstone of programming. It’s the ability to think critically, break down complex challenges, and craft solutions that not only work but are efficient and scalable. Without these skills, even the most proficient coder can struggle when faced with real-world software development tasks.&lt;/p&gt;

&lt;p&gt;In this post, I’ll share my perspective on the importance of &lt;strong&gt;problem-solving&lt;/strong&gt; in programming, key strategies for tackling challenges, and a practical example to put these concepts into context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Problem-Solving Matters More Than Syntax
&lt;/h3&gt;

&lt;p&gt;When I first started learning to program, I made the same mistake many beginners do: focusing entirely on the syntax of a language. I thought mastering Python, JavaScript, or C++ would make me a great programmer. But I soon realized that without the ability to understand and solve problems, knowing a language was like owning a tool without knowing how to use it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem-solving&lt;/strong&gt; isn’t just a technical skill; it’s a mindset. It’s about thinking creatively, embracing challenges, and being persistent when solutions aren’t immediately clear. This skill helps you adapt to different technologies and tools, making you more versatile and valuable as a programmer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Steps to Solve a Programming Problem
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Understand the Problem&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take time to read and fully comprehend the problem statement.&lt;/li&gt;
&lt;li&gt;Identify the inputs, outputs, and constraints.&lt;/li&gt;
&lt;li&gt;Ask yourself: What is the problem really asking me to do?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Break It Down&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Divide the problem into smaller, more manageable parts.&lt;/li&gt;
&lt;li&gt;Tackle each part step by step, rather than trying to solve the entire problem at once.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choose a Strategy&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think about possible approaches: brute force, recursion, or dynamic programming, for example.&lt;/li&gt;
&lt;li&gt;Evaluate the trade-offs of each approach.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Write Pseudocode&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Outline your solution in plain language or pseudocode before jumping into coding.&lt;/li&gt;
&lt;li&gt;This helps you clarify your logic and avoid unnecessary errors.
&lt;strong&gt;Code and Test&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Start coding your solution, keeping it clean and modular.&lt;/li&gt;
&lt;li&gt;Test your code with different inputs to ensure it works for all cases, including edge cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Refactor and Optimize&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Review your solution for improvements.&lt;/li&gt;
&lt;li&gt;Optimize for efficiency in terms of time and space complexity.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example: Solving a Problem
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
An ATM can only dispense bills in denominations of $50 and $20. You are asked to determine if a given amount can be withdrawn exactly using these denominations.&lt;br&gt;
&lt;strong&gt;For example:&lt;/strong&gt;&lt;br&gt;
Amount: $130 → Yes (2 × $50 + 1 × $20)&lt;br&gt;
Amount: $125 → No&lt;/p&gt;
&lt;h3&gt;
  
  
  Step-by-Step Solution:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Understand the Problem&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input: A single integer &lt;code&gt;amount&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Output: A boolean indicating whether the amount can be made using $50 and $20 bills.&lt;/li&gt;
&lt;li&gt;Constraints: The amount must be non-negative and divisible by the available denominations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Break It Down&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use a simple equation:
Let x be the number of $50 bills and y be the number of $20 bills.
We need to check if 50x + 20y = amount has a solution where x and y are non-negative integers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Simplify the Problem&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If an amount is divisible by 10, it might be possible to break it into $50 and $20 bills.&lt;/li&gt;
&lt;li&gt;Beyond this, check if the remainder after dividing by 50 can also be expressed using $20 bills.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pseudocode&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Function can_withdraw(amount):
    If amount is not divisible by 10:
        Return False
    For x in range(0, amount // 50 + 1):
        Remaining = amount - 50 * x
        If Remaining % 20 == 0:
            Return True
    Return False

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code the Solution (For this I'm using Python):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def can_withdraw(amount):
    if amount % 10 != 0:  # Only amounts divisible by 10 are valid
        return False
    for x in range(amount // 50 + 1):  # Try all possible $50 bill counts
        remaining = amount - 50 * x
        if remaining % 20 == 0:
            return True
    return False

# Example usage
print(can_withdraw(130))  # Output: True
print(can_withdraw(125))  # Output: False
print(can_withdraw(70))   # Output: True

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  My Perspective: Problem-Solving is a Lifelong Journey
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem-solving&lt;/strong&gt; is not something you master overnight. I've faced countless moments where I hit a wall, feeling stuck and frustrated. But over time, I've learned that persistence, curiosity, and a willingness to learn are the keys to growth. Every problem you solve builds your confidence and sharpens your skills, preparing you for even greater challenges ahead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Programming&lt;/strong&gt; is more than just writing code; it's about thinking critically and solving problems creatively. By focusing on developing your problem-solving skills, you'll not only become a better programmer but also equip yourself with a mindset that can tackle challenges in any area of life.&lt;br&gt;
So, the next time you're faced with a tough problem, take a step back, break it down, and approach it methodically. You'll be amazed at what you can accomplish.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Join to my newsletter:&lt;/strong&gt;&lt;a href="https://3nginuity.substack.com/subscribe" rel="noopener noreferrer"&gt;https://3nginuity.substack.com/subscribe&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  References:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.simplilearn.com/tutorials/programming-tutorial/problem-solving-in-programming" rel="noopener noreferrer"&gt;https://www.simplilearn.com/tutorials/programming-tutorial/problem-solving-in-programming&lt;/a&gt;&lt;br&gt;
&lt;a href="https://arc.dev/talent-blog/problem-solving-skills/" rel="noopener noreferrer"&gt;https://arc.dev/talent-blog/problem-solving-skills/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>learning</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
