Commit graph

139 commits

Author SHA1 Message Date
Jessica Kwok
ba03727fb6 Add solution using delete_if Ruby method 2021-03-15 09:52:22 -07:00
Jessica Kwok
9429ae92c1 Add remove elements challenge instructions 2021-03-12 18:51:41 -08:00
Vitor Oliveira
16176d3936 Minor fixes 2021-03-11 22:07:56 -08:00
Vitor Oliveira
02f625f95a Move to a different file since the input is sorted by default 2021-03-11 22:04:59 -08:00
Vitor Oliveira
68bb214bc0 Keep condition consistent 2021-03-11 22:01:02 -08:00
Vitor Oliveira
2b5c1b9d02 Add two pointer approach 2021-03-11 21:58:44 -08:00
Vitor Oliveira
de9a06bc26
Update data_structures/arrays/two_sum.rb 2021-03-11 21:22:39 -08:00
Vitor Oliveira
bdee1f9277
Update data_structures/arrays/two_sum.rb 2021-03-11 21:22:34 -08:00
Jessica Kwok
a6ae1c25b5 Add solution using a hash 2021-03-11 15:53:01 -08:00
Jessica Kwok
e58e707a57 Add another brute force solution 2021-03-11 09:20:26 -08:00
Jessica Kwok
6ed35ad29f Add brute force solution 2021-03-11 08:32:29 -08:00
Vitor Oliveira
27d725d8de
Merge pull request #96 from jsca-kwok/jk-sorted-squares
Add algorithm for returning sorted squares
2021-03-10 15:29:26 -08:00
Jessica Kwok
75aaa6e910
Update data_structures/arrays/sort_squares_of_an_array.rb
Co-authored-by: Vitor Oliveira <vbrazo@gmail.com>
2021-03-10 15:03:17 -08:00
Jessica Kwok
f9e7cd677d
Update data_structures/arrays/sort_squares_of_an_array.rb
Co-authored-by: Vitor Oliveira <vbrazo@gmail.com>
2021-03-10 15:02:55 -08:00
Jessica Kwok
92f09581f6 Add two pointers approach 2021-03-10 14:27:54 -08:00
Jessica Kwok
772be7084b Add bubble sort solution 2021-03-10 14:27:21 -08:00
Jessica Kwok
55e5b2a90f Refactored loop and multiply solution 2021-03-10 14:26:57 -08:00
Jessica Kwok
12e1a3c389 Add loop and multiply solution 2021-03-10 06:59:10 -08:00
Vitor Oliveira
fb2e8a9fd2 remove unnecessary variable 2021-03-09 19:21:14 -08:00
Vitor Oliveira
aeb7ee9e53 add approach 2 2021-03-09 19:19:59 -08:00
Vitor Oliveira
892c5d0064 Add approach 2021-03-09 19:10:06 -08:00
Vitor Oliveira
a786ac49fc Minor fixes 2021-03-09 16:38:56 -08:00
Vitor Oliveira
9f04ffb0df Change condition style 2021-03-09 16:36:29 -08:00
Vitor Oliveira
929568120c Minor changes 2021-03-09 16:32:57 -08:00
Jessica Kwok
13a2fe09b5 Hash table approach 2021-03-09 14:49:17 -08:00
Jessica Kwok
47a8216712 Sort plus comparing adjacent elements 2021-03-09 14:49:05 -08:00
Jessica Kwok
90a35a8197 Brute force approach 2021-03-09 14:48:21 -08:00
Vitor Oliveira
627ab8a265 Drop unused .each 2021-03-01 16:47:45 -08:00
Vitor Oliveira
f072feacff Use .count as standard 2021-03-01 16:46:57 -08:00
Vitor Oliveira
1d84acbabf Fix issues 2021-02-28 17:12:11 -08:00
Vitor Oliveira
059d319a09 Change condition structure 2021-02-28 17:03:15 -08:00
Vitor Oliveira
29dc653dba Minor changes 2021-02-28 17:01:15 -08:00
Vitor Oliveira
8e1e5586a5 Add O(1) space approach 2021-02-28 13:24:29 -08:00
Vitor Oliveira
c829dd4896 Add more explanation 2021-02-28 13:17:09 -08:00
Vitor Oliveira
e21120857d Clean up 2021-02-06 23:05:54 -08:00
Vitor Oliveira
a285989e1c Rename var 2020-12-19 20:23:48 -08:00
Vitor Oliveira
dcfdf73a7f Separators 2020-12-19 20:20:45 -08:00
Vitor Oliveira
ecde337d9b Add better solution - O(n) time and space 2020-12-19 20:18:22 -08:00
Vitor Oliveira
d24e95ae02 Add brute force solution 2020-12-19 20:18:06 -08:00