INTERFACE LANGUAGE:
Profile and CV
Projects
Events
 

A set of Linux shell scripts to setup and managing web servers.

ns_setup

File name : ns_setup.sh
Author (s) : Hossein Ebrahimi @he71.com, An automation to install DNS updater (godaddy only), Apache, PHP 5.x, 7.x; ftp server, vpn-server (pptp) and telegram-cli

license AGPL-3.0 This code is free software: you can redistribute it and/or modify i... [More]
2018-05-01 [link]


DNSupdater

GoDaddy.sh v0.51 Hossein Ebrahimi - @he71.com Based on GoDaddy.sh by Nazar78 @ TeaNazaR.com v1.0 - 20160513 - 1st release. Adapted to work with log file and multi domains Hossein Ebrahimi - @he71.com

license AGPL-3.0

This code is free software: you can redistribute it and/or modify

it under the terms of the GNU Affero Gene... [More]
2018-05-01 [link]


A challenge to find all possible different solutions for a classical question named 'Shoes Size'
2018-04-12 [link]


ShoesSize 2018-04-12
ShoesSize
Inside
FONT SIZE:

Where the idea comes from

There was an Internet test that I did because of a job application a few weeks ago. The assignment was a very classic question and I knew the solution for the assignment. There was an opportunity to chose the language to write code so I started to code in C++. I did not test my code during inserting statements in the web base interface that was prepared to do the test. When the code inserting was almost finished I did the first run to check the code. The result was a very long list of errors. So I copied my code to a local IDE (Eclipse) and tested the code with a standard compiler on a Linux environment. The code was run without any kinds of error or warning. Suddenly I realized that the test environment doesn't support ANSI C++ earlier than 10. Unfortunately there was no time to right the code in a new way so I lost the test but it popped an idea to write all possible solutions to challenge my self to solve a problem.

Two first solutions took about an hour, the third one took about a day, for the fourth one I spent about four days but still is not completed.

Are you interested in challenging yourself by finding a new solution for a simple question? Join me @ https://github.com/tOSuser/ShoesSize

Rules
1 - Algorithm should be not used before by the other solutions that have been already done.
2 - The technique to code should be unique and not be used before by the other solutions that have been already done.

Task Description
The task is divided into two parts.

Problem 1): popular_size

Find/return the most popular shoe size in the given list of shoe sizes and associated names. If there is no uniquely popular shoe size, return -1.
Problem 2): popular_name

Find/return the most popular name for the most popular shoe size. If there is no uniquely common name, OR if there is no uniquely popular shoe size, return an empty string. Names are case sensitive.

Solutions

Solution A - Using vector to re-table elements to be compatible with c++ standard libraries such as 'vector', 'list' and 'algorithm' - Smallest code

Solution B - Tracing un-utilized data table without storing data - Fastest code

Solution C - The bindery tree method

Solution D -

Git

Hossein Ebrahimi Official site - ShoesSize
Copyright (c) 2006- 2018 All Rights Reserved
Based on Parnian Opendata copyright (c) Parniansoft 2008 - 2018 [0,22a]