r/codefights • u/CodeFights • Jul 28 '17
r/codefights • u/CodeFights • Feb 09 '18
From hardware engineer to software engineer at Evernote: a CodeFighter's success story!
r/codefights • u/CodeFights • Sep 18 '17
Reverse a linked list (recursive solution & iterative solution)
r/codefights • u/CodeFights • Sep 13 '17
Preparing for a Developer Interview
r/codefights • u/CodeFights • Aug 24 '17
Beautiful JavaScript Solution | Code Walkthrough
r/codefights • u/Shot_Accountant_8613 • Nov 16 '20
stuck on Arcade question 4
I get an error that says:
main.c: In function ‘adjacentElementsProduct’:
main.c on line 19:30: error: subscripted value is neither array nor pointer nor vector
for(i = 0; i < inputArray[i] != '\0'; i++){
^ main.c on line 20:29: error: subscripted value is neither array nor pointer nor vector
product = inputArray[i] * inputArray[i + 1];
^ main.c on line 20:45: error: subscripted value is neither array nor pointer nor vector
product = inputArray[i] * inputArray[i + 1];
// Arrays are already defined with this interface:// typedef struct arr_##name {// int size;// type *arr;// } arr_##name;//// arr_##name alloc_arr_##name(int len) {// arr_##name a = {len, len > 0 ? malloc(sizeof(type) * len) : NULL};// return a;// }////int adjacentElementsProduct(arr_integer inputArray) {
int i;int product = 0;int largest_product = 0;
for(i = 0; i < inputArray[i] != '\0'; i++){
product = inputArray[i] * inputArray[i + 1];if(product > largest_product){
largest_product = product;}}return largest_product;}
r/codefights • u/CodeFights • Nov 02 '17
Register for the Polyglot Marathon, Nov. 11!
Polyglot (noun): A person who has mastered multiple languages.
Are you a programming polyglot? Here’s your chance to prove it! On November 11, CodeFights is hosting a two-hour Polyglot Marathon.
This marathon has 12 coding tasks. You get to choose which language you want to solve each question in, and each one must be solved in a different coding language. (Note: CodeFights supports 38 different programming languages, but Python 2 === Python 3 and C === C++ for the purposes of this marathon.)
The top 10 participants will all receive a $50 Amazon gift card and 500,000 CodeFights coins.
Sign up here!