https://www.cruzmarquez.com/Jose' SiteC/C++ and JS code for different projects, from solutions to contest's problems, to personal projects in different areas. 2023-07-31T21:33:28+03:00 José Cruz Márquez Aguilar https://www.cruzmarquez.com/ Jekyll © 2023 José Cruz Márquez Aguilar /assets/img/favicons/favicon.ico /assets/img/favicons/favicon-96x96.png Arrays with C++2023-04-20T13:00:00+03:00 2023-04-20T13:00:00+03:00 https://www.cruzmarquez.com/posts/2023/04/20/cpp-arrays/ jose Arrays with C++ In programming, an array is a collection of elements of the same data type, stored in contiguous memory locations. Arrays are a fundamental data structure in programming, and understanding how to use them is essential for writing effective code. Declaring Arrays in C++ To declare an array in C++, you use square brackets to specify the size of the array and braces to initializ... Vectors with C++2023-04-20T12:59:00+03:00 2023-04-20T12:59:00+03:00 https://www.cruzmarquez.com/posts/2023/04/20/cpp-vectors/ jose Vectors with C++ In programming, vectors are a data structure used for storing collections of values. Vectors are implemented as templates in C++, allowing them to store values of any data type. In this page, we will explore how to use vectors in C++. Declaring Arrays in C++ To declare a vector in C++, you use the vector keyword followed by the data type of the elements in the vector: vecto... Linked List with C++2023-04-20T12:58:00+03:00 2023-04-20T12:58:00+03:00 https://www.cruzmarquez.com/posts/2023/04/20/cpp-linked-list/ jose Linked List with C++ A linked list is a data structure that consists of a sequence of nodes, where each node contains a value and a pointer to the next node in the sequence. Linked lists are commonly used in computer programming to implement dynamic data structures. Linked List Node To implement a linked list in C++, we first define a struct to represent a node: struct Node { int data; ... Permutation Sequence2023-04-19T13:00:00+03:00 2023-04-19T13:00:00+03:00 https://www.cruzmarquez.com/posts/2023/04/19/leetcode-60-permutation-sequence/ jose Problem The set [1, 2, 3, ..., n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following sequence for n = 3: "123" "132" "213" "231" "312" "321" Given n and k, return the kth permutation sequence. Examples Example 1: Input: n = 3, k = 3 Output: “213” Example 2: Input: n = 4, k = 9 Output: “2314” Example 3: In... Wildcard Matching2023-04-19T13:00:00+03:00 2023-04-19T13:00:00+03:00 https://www.cruzmarquez.com/posts/2023/04/19/leetcode-44-wildcard-matching/ jose Problem Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*' where: '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching should cover the entire input string (not partial). Examples Example 1: Input: s = “aa”, p = “a” Output: false Explanation: “a” does not mat...