├── README.md ├── backend ├── csharp │ ├── README.md │ ├── assets │ │ ├── Common_Language_Runtime_(CLR).png │ │ ├── Multiple-inheritance_in_C_.png │ │ ├── arrays_in_C_.png │ │ └── csharp.jpg │ └── coding │ │ ├── hotel-room.cs │ │ ├── longest-words.cs │ │ ├── shortest-fizz-buzz.cs │ │ └── sum-of-array-plus-one.cs ├── django │ ├── README.md │ └── assets │ │ ├── django.png │ │ ├── lifecycle.png │ │ └── mvt.png ├── microservice │ ├── README.md │ └── assets │ │ ├── Bounded_Context.jpg │ │ ├── Cohesion_and_Coupling.jpg │ │ ├── Domain_driven_design.jpg │ │ ├── Explain_Container_in_Microservices.jpg │ │ ├── Microservice_Architecture.jpg │ │ ├── Microservices_Interview.jpg │ │ ├── Mike_Cohn’s_Test_Pyramid.jpg │ │ ├── ddd.png │ │ ├── difference_between_Monolithic__SOA_and_Microservices_Architecture.jpg │ │ ├── explain-type-of-tests-mostly-used-in-microservices.jpg │ │ ├── features_of_Microservices.jpg │ │ ├── microservices.png │ │ └── oauth.jpg ├── nginx │ ├── README.md │ └── assets │ │ └── nginx.jpg ├── nodejs │ ├── README.md │ └── assets │ │ ├── Nodejs-event_loop.png │ │ ├── clustering_in_Nodejs.png │ │ ├── event-loop.png │ │ ├── nodejs-thread-pool.png │ │ ├── nodejs.jpeg │ │ └── reactor-pattern.jpg ├── php │ ├── README.md │ ├── assets │ │ ├── Associative_Array.jpg │ │ ├── Different_Types_Of_PHP_Variables.jpg │ │ ├── Indexed_Array.jpg │ │ ├── Multidimensional_Array.jpg │ │ ├── Output.png │ │ ├── Types_of_Arrays_in_PHP.jpg │ │ └── php.jpg │ └── coding │ │ ├── factorial.php │ │ ├── hotel-room.php │ │ ├── integer-length.php │ │ ├── reverse-words-in-string.php │ │ ├── shortest-fizz-buzz.php │ │ ├── sum-of-array-plus-one.php │ │ └── transitive-dependencies.php ├── python │ ├── README.md │ ├── assets │ │ ├── Hierarchical_Inheritance.jpg │ │ ├── Memory_Management_in_Python.jpg │ │ ├── Multi-level_Inheritance.jpg │ │ ├── Multiple_Inheritance.jpg │ │ ├── Pickle_Module.jpg │ │ ├── Python_namespaces.jpg │ │ ├── Single_Inheritance.jpg │ │ ├── delete_rowcolumn_from_dataframe.jpg │ │ ├── differences_between_pickling_and_unpickling.jpg │ │ ├── dynamically_typed_language.jpg │ │ ├── get_the_items_that_are_not_common_to_both_the_given_series_A_and_B.jpg │ │ ├── python.png │ │ └── uses_of_numpy.jpg │ ├── coding │ │ ├── anagram-detection.py │ │ ├── array-pair-sum.py │ │ ├── balanced-brackets.py │ │ ├── bubble-sort.py │ │ ├── closetsum.py │ │ ├── convert-array.py │ │ ├── csv-parsing.py │ │ ├── even-occuring-element.py │ │ ├── factorial.py │ │ ├── fibonacci.py │ │ ├── find-missing-element.py │ │ ├── first-non-repeated-character.py │ │ ├── flatten-array.py │ │ ├── largest-continuous-sum.py │ │ ├── multiples-of-3-and-5.py │ │ ├── once.py │ │ ├── prime-number.py │ │ ├── quick-sort.py │ │ ├── shortest-fizz-buzz.py │ │ ├── string-permutations.py │ │ ├── sum-of-array-plus-one.py │ │ └── tree-level-order-print.py │ ├── numpy │ │ ├── README.md │ │ └── assets │ │ │ ├── numpy.jpeg │ │ │ └── uses_of_numpy.jpg │ └── pandas │ │ ├── README.md │ │ └── assets │ │ ├── delete_rowcolumn_from_dataframe.jpg │ │ ├── get_the_items_that_are_not_common_to_both_the_given_series_A_and_B.jpg │ │ └── pandas.png ├── web-services │ ├── README.md │ └── assets │ │ ├── JAXB.png │ │ ├── Java_Web_Service.png │ │ ├── Restful_Web_Service.png │ │ ├── SOAP_Elements.png │ │ ├── UDDI.png │ │ ├── Web_Service.png │ │ ├── Web_Service_Protocol_Stack.png │ │ ├── Web_Service_roles__operation____artifacts.png │ │ ├── Web_Service_type.png │ │ ├── soap_advantages.png │ │ ├── web-services.jpeg │ │ ├── wsdl.png │ │ └── xml-rpc.png └── websocket │ ├── README.md │ └── assets │ ├── long-polling.png │ ├── short-polling.png │ └── websocket.jpeg ├── basics ├── algorithms │ ├── README.md │ └── assets │ │ ├── Big_O.png │ │ ├── Dijkstra's_Algorithm.png │ │ ├── Divide_and_Conquer.png │ │ ├── Dynamic_Programming.png │ │ ├── Linear_Search_Algorithm.png │ │ ├── Need_For_Algorithms.png │ │ ├── Omega.png │ │ ├── The_Theta_Notation.png │ │ ├── What_is_an_Algorithm.png │ │ ├── algo.jpg │ │ ├── merge_sort_algorithm.png │ │ └── quicksort.gif ├── cpp │ ├── README.md │ ├── assets │ │ ├── Class_in_C__.png │ │ ├── Inheritance_in_C__.png │ │ ├── Polymorphism_in_C__.png │ │ └── cpp.jpg │ └── coding │ │ ├── ShopInCandyStore.hpp │ │ ├── once.hpp │ │ ├── queue.hpp │ │ ├── spiral.hpp │ │ └── stack.hpp ├── cyber │ ├── README.md │ └── assets │ │ ├── ARP_poisoning.jpg │ │ ├── Black_Hat__White_Hat_and_Grey_Hat_Hackers.jpg │ │ ├── Botnet.jpg │ │ ├── Cyber_Security.jpg │ │ ├── Cyber_Security_3-hashing.jpg │ │ ├── Cyber_Security_30-Encryption.jpg │ │ ├── Cyber_Security_objectives.jpg │ │ ├── DNS_attack.jpg │ │ ├── Firewall.jpg │ │ ├── Honeypot.jpg │ │ ├── Polymorphic_viruses.jpg │ │ ├── Risk___Likelihood_of_a_threat__Vulnerability_Impact.jpg │ │ ├── SQL_injection.jpg │ │ ├── Shoulder_Surfing.jpg │ │ ├── System_Hardening.jpg │ │ ├── Tracking_cookies.jpg │ │ ├── Two-factor_authentication_(2FA).jpg │ │ ├── VPN.jpg │ │ ├── Vulnerability_Assessment_and_Penetration_Testing.jpg │ │ ├── XSS.jpg │ │ ├── brute-force-in-cyber-security.jpg │ │ ├── encryption_function.jpg │ │ ├── hids_vs_nids.jpg │ │ ├── ids-vs-ips.jpg │ │ ├── man-middle-attack.jpg │ │ ├── network_sniffing.jpg │ │ ├── phishing.jpg │ │ ├── phishing_vs_spear_phishing.jpg │ │ ├── vlan-vs_-vpn.jpg │ │ ├── what-is-ddos-attack-and-how-to-prevent-it.jpg │ │ └── which-is-more-reliable-ssl-or-https.jpg ├── data-structures │ ├── README.md │ └── assets │ │ ├── LRU-cache.png │ │ ├── adjacency-list.png │ │ ├── adjacency-matrix.png │ │ ├── applications-data-structure.png │ │ ├── binary-search-tree.png │ │ ├── binary-tree.png │ │ ├── data-structure-types.png │ │ ├── data_structure.jpg │ │ ├── graph-data-structure.png │ │ ├── left-view-binary-tree.png │ │ ├── linear-vs-non-linear.png │ │ ├── linked-list.png │ │ ├── multidimensional-array.png │ │ ├── postorder-traversal.png │ │ ├── queue.png │ │ ├── stack-vs-queue.png │ │ ├── stack.png │ │ └── tree-data-structure.png ├── design-patterns │ ├── README.md │ └── assets │ │ ├── Bridge_design_pattern.png │ │ ├── Chain_of_Responsibility_pattern.png │ │ ├── Class_Diagram.png │ │ ├── Command_pattern.png │ │ ├── Decorator_Design_Pattern.png │ │ ├── Factory_Design_Pattern.png │ │ ├── MVC_design_pattern.png │ │ ├── Observer_design_pattern.png │ │ ├── Proxy_Design_Pattern.png │ │ ├── SOLID_principles.png │ │ ├── What_are_design_patterns.png │ │ ├── design-pattern.png │ │ └── types_of_design_patterns_in_java.png ├── network │ ├── README.md │ └── assets │ │ ├── ARP_Protocol.png │ │ ├── Bus_Topology.png │ │ ├── Firewall.png │ │ ├── Hybird_Topology.jpg │ │ ├── LAN_(Local_Area_Network).png │ │ ├── Layers_of_OSI_Model.png │ │ ├── Layers_of_TCP_IP.png │ │ ├── Mesh_Topology.png │ │ ├── Network_Types.png │ │ ├── Nodes_and_Links.png │ │ ├── OSI_Vs_TCP_IP.png │ │ ├── Ring_Topology.png │ │ ├── SMTP_Protocol.png │ │ ├── Star_Topology.png │ │ ├── Subnet.png │ │ ├── TCP_Vs_UDP.png │ │ ├── Tree_Topology.png │ │ ├── VPN_(Virtual_Private_Network).png │ │ ├── google.jpg │ │ └── network.jpg ├── oops │ ├── README.md │ └── assets │ │ ├── constructor.png │ │ ├── encapsulation.png │ │ ├── inheritance-with-ex.png │ │ ├── oop.jpg │ │ ├── oops-features.png │ │ ├── polymorphism.png │ │ ├── programming-paradigms.png │ │ ├── superclass.png │ │ ├── types_of_inheritance.png │ │ └── types_of_polymorphism.png └── os │ ├── README.md │ └── assets │ ├── OS.png │ ├── OS_Process.png │ ├── Process_and_Thread.png │ ├── RAID_Level.png │ ├── RTOS.png │ ├── asymmetric_cluttering.png │ ├── boostrap_program_in_os.png │ ├── kernel-os.png │ ├── kernel_oS.png │ ├── monolithic_and_microkernel.png │ ├── multiprocessing.png │ ├── multiprogramming.png │ ├── multitasking-os.png │ ├── scheduling-algorithm-os.png │ ├── states_of_process.png │ ├── thread_in_os.png │ └── virtual_memory.png ├── database ├── mongodb │ ├── README.md │ └── assets │ │ ├── Mongos.jpg │ │ ├── Non_sharded_client_connection.jpg │ │ ├── aggregation-framework.jpg │ │ ├── mongodb_aggregation_pipeline.jpg │ │ ├── mongologo.png │ │ ├── replication_architecture.jpg │ │ └── sharded_client_connection.jpg ├── mysql │ ├── README.md │ └── assets │ │ ├── architecture.png │ │ ├── mysql.png │ │ └── sharding.png ├── postgresql │ ├── README.md │ └── assets │ │ ├── acid.jpg │ │ ├── architecture.jpg │ │ ├── parallel_queries_in_PostgreSQL.jpg │ │ └── postgres.jpeg └── sql │ ├── README.md │ └── assets │ ├── Books_Table_(2nd_Normal_Form).png │ ├── Entities_and_Relationships.jpg │ ├── OLTP.jpg │ ├── SQL_View.jpg │ ├── Salutations_Table_(3rd_Normal_Form).png │ ├── Stored_Procedure.jpg │ ├── Students_Table(3rd_Normal_Form).png │ ├── Students_Table.png │ ├── Students_Table_(1st_Normal_Form).png │ ├── Students_Table_(2nd_Normal_Form).png │ ├── cross_join.jpg │ ├── dbms_vs_rdbms.jpg │ ├── differences_between_OLTP_and_OLAP.jpg │ ├── sql.jpg │ ├── sql_join.jpg │ └── sql_vs_mysql.jpg ├── devops ├── README.md ├── assets │ ├── Agile_Methodology.jpg │ ├── Architecture_of_Jenkins.jpg │ ├── Blue_Green_Deploy.gif │ ├── DevOps_Configuration_Management.jpg │ ├── DevOps_Continuous_Integration_(CI).jpg │ ├── DevOps_Shift_left_to_reduce_failure_concept.jpg │ ├── DevOps_Tools.jpg │ ├── DevOps_pipeline.jpg │ ├── Difference_between_Continuous_Deployment_and_Continuous_Delivery.jpg │ ├── What_is_DevOps.jpg │ ├── devops.png │ └── phase.png ├── docker │ ├── README.md │ └── assets │ │ ├── Docker_File.png │ │ ├── Hypervisor.png │ │ ├── docker-container-lifecycle.png │ │ ├── docker-container.png │ │ ├── docker.jpg │ │ └── docker_components.png ├── golang │ ├── README.md │ ├── assets │ │ ├── Go_channels.png │ │ ├── Golang_packages.png │ │ ├── Golang_pointers.png │ │ ├── How_can_we_check_if_the_Go_map_contains_a_key.png │ │ ├── golang.png │ │ └── slice.png │ └── coding │ │ ├── longest-words.go │ │ ├── merge-sort.go │ │ ├── multiples-of-3-or-5.go │ │ ├── shortest-fizz-buzz.go │ │ ├── stack.go │ │ └── string-permutations.go └── kubernetes │ ├── README.md │ └── assets │ ├── Kubernetes_Cluster.jpg │ ├── Kubernetes_Workflow.jpg │ ├── Load_Balancer.jpg │ ├── Pod_Network.jpg │ └── kubernetes.jpg ├── frontend ├── css │ ├── README.md │ └── assets │ │ ├── Box_Model_in_CSS.jpg │ │ ├── CSS_Margin_vs._Padding.png │ │ ├── CSS_Position_Property.jpg │ │ ├── CSS_Sprites.png │ │ ├── CSS_selectors_matched_against_the_elements_by_the_browser.png │ │ ├── DOM.png │ │ ├── border_box.png │ │ ├── clear_property__1.png │ │ ├── clear_property__2.png │ │ ├── content_box.png │ │ ├── css-dom.png │ │ ├── css.jpg │ │ ├── flex-terminology.png │ │ ├── flex.png │ │ ├── grid-term.jpg │ │ ├── grid.png │ │ ├── opacity_in_css3.png │ │ └── z-index.png ├── es6 │ ├── README.md │ └── assets │ │ ├── Javascript-for-Python-Developers_Watermarked.webp │ │ └── es6.jpg ├── html │ ├── README.md │ └── assets │ │ ├── Artboard_1_2x.png │ │ ├── Artboard_2_2x.png │ │ ├── Bigger_Screen_(650px).png │ │ ├── Convert_the_below_data_into_Tabular_format_in_HTML5.png │ │ ├── Explain_HTML5_Graphics..png │ │ ├── Explain_Web_Components_and_it’s_usage..png │ │ ├── For_any_other_screen.png │ │ ├── Geolocation_API.png │ │ ├── How_to_specify_the_metadata_in_HTML5.png │ │ ├── Image_List.png │ │ ├── Inline_and_block_elements_in_HTML5.png │ │ ├── Microdata_in_HTML5.png │ │ ├── Resolution_switching.png │ │ ├── cell-padding-vs-cell-spacing.png │ │ ├── css-styles-for-html5-element.png │ │ ├── explain-web-components-and-its-usage.png │ │ ├── html-intro.png │ │ ├── html-output-tag.png │ │ ├── html.jpg │ │ ├── html5-new-tags-in-media-elements.png │ │ ├── is-datalist-and-select-tag-same.png │ │ └── progressive-rendering.png ├── javascript │ ├── README.md │ ├── assets │ │ ├── dom.png │ │ ├── hoisting-in-js.png │ │ ├── js.png │ │ ├── js_promise_resolve_reject.png │ │ ├── js_promise_then_catch.png │ │ ├── object_prototype.png │ │ ├── passed_by_reference.png │ │ ├── passed_by_value.png │ │ └── static_vs_dynamic_typing.png │ └── coding │ │ ├── anagram-detection.js │ │ ├── array-pair-sum.js │ │ ├── balanced-brackets.js │ │ ├── binary-search-tree-check.js │ │ ├── binary-search-tree.js │ │ ├── bubble-sort.js │ │ ├── byte-format.js │ │ ├── combine-two-strings.js │ │ ├── convert-array.js │ │ ├── csv-parsing.js │ │ ├── debounce.js │ │ ├── even-occuring-element.js │ │ ├── factorial.js │ │ ├── fibonnaci.js │ │ ├── find-missing-element.js │ │ ├── first-non-repeated-character.js │ │ ├── flatten-array.js │ │ ├── flatten-array │ │ ├── copy.js │ │ ├── es5.js │ │ ├── in-place.js │ │ └── recursive.js │ │ ├── get-elements-by-class-name.js │ │ ├── hotel-room.js │ │ ├── insertion-sort.js │ │ ├── integer-difference.js │ │ ├── integer-length.js │ │ ├── kth-largest-element-in-array.js │ │ ├── largest-continuous-sum.js │ │ ├── largest-palindrome.js │ │ ├── linked-list.js │ │ ├── longest-compound-word.js │ │ ├── longest-words.js │ │ ├── matching-nodes.js │ │ ├── median-integer-stream.js │ │ ├── merge-sort.js │ │ ├── missing-number.js │ │ ├── money-format.js │ │ ├── multiples-of-3-and-5.js │ │ ├── next-highest-number.js │ │ ├── next-palindrome-number.js │ │ ├── number-format.js │ │ ├── odd-occuring-element.js │ │ ├── once.js │ │ ├── prime-number.js │ │ ├── queen-threatens-king.js │ │ ├── queen-threatens-king │ │ ├── queen-threatens-king-solution-diagonal-1.png │ │ ├── queen-threatens-king-solution-diagonal-2.png │ │ ├── queen-threatens-king-solution-horizontal.png │ │ ├── queen-threatens-king-solution-vertical.png │ │ └── readme.md │ │ ├── queue.js │ │ ├── quick-sort.js │ │ ├── remove-duplicates-from-string.js │ │ ├── reverse-words-in-string.js │ │ ├── search-unknown-length-array.js │ │ ├── selection-sort.js │ │ ├── shortest-fizz-buzz.js │ │ ├── sorted-array-search.js │ │ ├── spiral.js │ │ ├── stack.js │ │ ├── string-format.js │ │ ├── string-permutations.js │ │ ├── string-rotation.js │ │ ├── sum-of-array-plus-one.js │ │ ├── throttle.js │ │ ├── transform-word.js │ │ ├── tree-level-order-print.js │ │ ├── word-analytics.js │ │ └── word-positions.js ├── react │ ├── README.md │ └── assets │ │ ├── Higher_Order_Components.png │ │ ├── How_to_pass_data_between_react_components.png │ │ ├── How_to_pass_data_between_sibling_components_using_React_router.png │ │ ├── What_are_keys_in_React.png │ │ ├── What_is_prop_drilling_in_React.png │ │ ├── different_phases_of_the_component_lifecycle.png │ │ ├── react.png │ │ ├── types_of_Hooks_in_React.png │ │ ├── virtual_DOM-how_does_it_work.png │ │ └── virtual_DOM.png ├── typescript │ ├── README.md │ └── assets │ │ ├── Typescript.png │ │ ├── Typescript_Artboard_3.png │ │ ├── Typescript_Compilation_Process.png │ │ ├── Typescript_Types.png │ │ └── logo.png └── web-api │ ├── README.md │ └── assets │ ├── API_Application.png │ ├── MVC_vs_Web_API.png │ ├── WEB_API.png │ ├── Web_api_filter.png │ ├── cors.png │ ├── mediaformatter.png │ └── web-api.jpg ├── interviews.jpg └── mobile ├── android ├── README.md └── assets │ ├── Android_Architecture.png │ ├── Life_Cycle_of_Android.png │ ├── Types_Of_Context.png │ ├── Types_Of_Intents.jpg │ ├── adapter.png │ └── android.jpg ├── ios ├── README.md └── assets │ ├── Architecture_of_iOS.png │ ├── Facade.png │ ├── MVC.png │ ├── MVVM.png │ ├── Objective-C_in_OS.png │ ├── Swift_in_iOS.png │ ├── TDD.png │ ├── deep_linking_in_iOS.png │ ├── iBeacons_in_iOS.png │ ├── ios.jpg │ ├── ios_application_states.png │ └── synchronous_and_asynchronous_tasks_in_iOS.png ├── java ├── README.md ├── assets │ ├── JIT_Compiler.jpg │ ├── constructor_chaining_in_Java.jpg │ ├── constructor_overloading_java.png │ ├── data_encapsulation.jpg │ ├── exception.png │ ├── instance_vs_local_variable.png │ ├── java.png │ ├── java_stack.jpg │ ├── java_thread_lifecycle.jpg │ ├── jdk.jpg │ ├── method_overloading.png │ ├── method_overriding.png │ ├── sorting_of_objects_in_arraylist.png │ ├── sorting_of_values_in_array.png │ ├── string_pool.png │ ├── string_pool_by_assignment_operator.png │ ├── string_pool_by_means_of_assignment_operator.png │ ├── with_synchronization.png │ └── without_synchronization.png └── coding │ ├── AnagramDetection.java │ ├── ArrayPairSum.java │ ├── BalancedBrackets.java │ ├── BinarySearchTree.java │ ├── BinarySearchTreeCheck.java │ ├── BubbleSort.java │ ├── CombineTwoStrings.java │ ├── ConvertArray.java │ ├── EvenOccuringElement.java │ ├── Fibonacci.java │ ├── FindingMissingElement.java │ ├── HotelRoom.java │ ├── IntegerDifference.java │ ├── LargestContinuousSum.java │ ├── LargestPalindrome.java │ ├── LongestCommonPrefix.java │ ├── LongestCompoundWord.java │ ├── MedianIntegerStream.java │ ├── NextHighestNumber.java │ ├── RemoveDuplicatesFromString.java │ ├── ReverseWordsInAString.java │ ├── SearchUnknownLengthArray.java │ ├── Spiral.java │ ├── StringRotation.java │ └── TreeLevelOrderPrint.java └── react-native ├── README.md └── assets ├── IOS_Platform.png ├── Image-11.png ├── Image-12.png ├── Image-2.png ├── Props_Drilling.png ├── SSL_Pinning.png ├── android_platform.png ├── bridge_in_react_native.png ├── developer-menu.png ├── react-native-redux.png ├── react-native.jpg └── reactjs_vs_react_native.png /backend/csharp/assets/Common_Language_Runtime_(CLR).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/csharp/assets/Common_Language_Runtime_(CLR).png -------------------------------------------------------------------------------- /backend/csharp/assets/Multiple-inheritance_in_C_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/csharp/assets/Multiple-inheritance_in_C_.png -------------------------------------------------------------------------------- /backend/csharp/assets/arrays_in_C_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/csharp/assets/arrays_in_C_.png -------------------------------------------------------------------------------- /backend/csharp/assets/csharp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/csharp/assets/csharp.jpg -------------------------------------------------------------------------------- /backend/csharp/coding/longest-words.cs: -------------------------------------------------------------------------------- 1 | char[] delimiter = new char[] { ' ' }; 2 | public List FindLongestWords(string sentence) 3 | { 4 | List longestWords = new List(); 5 | int currentLongestLength = 0; 6 | string[] words = sentence.Split(delimiter, StringSplitOptions.RemoveEmptyEntries); 7 | if (words != null && words.Length > 0) 8 | { 9 | foreach (string word in words) 10 | { 11 | // Duplicate check. 12 | if (!longestWords.Contains(word.ToLower())) 13 | { 14 | // If word is longer than the current longest. We clear our word list and add only this one. 15 | if (word.Length > currentLongestLength) 16 | { 17 | longestWords.Clear(); 18 | longestWords.Add(word.ToLower()); 19 | currentLongestLength = word.Length; 20 | } 21 | // If word's length equals currentLongest, we just add it to the list. 22 | else if (word.Length == currentLongestLength) 23 | { 24 | longestWords.Add(word); 25 | } 26 | } 27 | } 28 | } 29 | return longestWords; 30 | } 31 | -------------------------------------------------------------------------------- /backend/csharp/coding/shortest-fizz-buzz.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace fizz_buzz 3 | { 4 | class Program 5 | { 6 | static void Main(string[] args) 7 | { 8 | for (int i = 1; i < 101; i++) 9 | { 10 | if (i % 3 < 1) 11 | Console.Write("fizz"); 12 | if (i % 5 < 1) 13 | Console.Write("buzz"); 14 | if (i % 3 > 0 && i % 5 > 0) 15 | Console.Write("{0}", i); 16 | Console.WriteLine(""); 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /backend/csharp/coding/sum-of-array-plus-one.cs: -------------------------------------------------------------------------------- 1 | public int SumOfIntegers(int[] integerArray) 2 | { 3 | int sum = 0; 4 | foreach (int item in integerArray) 5 | { 6 | sum += item; 7 | } 8 | return sum + integerArray.Length; 9 | } 10 | -------------------------------------------------------------------------------- /backend/django/assets/django.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/django/assets/django.png -------------------------------------------------------------------------------- /backend/django/assets/lifecycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/django/assets/lifecycle.png -------------------------------------------------------------------------------- /backend/django/assets/mvt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/django/assets/mvt.png -------------------------------------------------------------------------------- /backend/microservice/assets/Bounded_Context.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/Bounded_Context.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/Cohesion_and_Coupling.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/Cohesion_and_Coupling.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/Domain_driven_design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/Domain_driven_design.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/Explain_Container_in_Microservices.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/Explain_Container_in_Microservices.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/Microservice_Architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/Microservice_Architecture.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/Microservices_Interview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/Microservices_Interview.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/Mike_Cohn’s_Test_Pyramid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/Mike_Cohn’s_Test_Pyramid.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/ddd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/ddd.png -------------------------------------------------------------------------------- /backend/microservice/assets/difference_between_Monolithic__SOA_and_Microservices_Architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/difference_between_Monolithic__SOA_and_Microservices_Architecture.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/explain-type-of-tests-mostly-used-in-microservices.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/explain-type-of-tests-mostly-used-in-microservices.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/features_of_Microservices.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/features_of_Microservices.jpg -------------------------------------------------------------------------------- /backend/microservice/assets/microservices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/microservices.png -------------------------------------------------------------------------------- /backend/microservice/assets/oauth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/microservice/assets/oauth.jpg -------------------------------------------------------------------------------- /backend/nginx/assets/nginx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/nginx/assets/nginx.jpg -------------------------------------------------------------------------------- /backend/nodejs/assets/Nodejs-event_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/nodejs/assets/Nodejs-event_loop.png -------------------------------------------------------------------------------- /backend/nodejs/assets/clustering_in_Nodejs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/nodejs/assets/clustering_in_Nodejs.png -------------------------------------------------------------------------------- /backend/nodejs/assets/event-loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/nodejs/assets/event-loop.png -------------------------------------------------------------------------------- /backend/nodejs/assets/nodejs-thread-pool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/nodejs/assets/nodejs-thread-pool.png -------------------------------------------------------------------------------- /backend/nodejs/assets/nodejs.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/nodejs/assets/nodejs.jpeg -------------------------------------------------------------------------------- /backend/nodejs/assets/reactor-pattern.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/nodejs/assets/reactor-pattern.jpg -------------------------------------------------------------------------------- /backend/php/assets/Associative_Array.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/php/assets/Associative_Array.jpg -------------------------------------------------------------------------------- /backend/php/assets/Different_Types_Of_PHP_Variables.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/php/assets/Different_Types_Of_PHP_Variables.jpg -------------------------------------------------------------------------------- /backend/php/assets/Indexed_Array.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/php/assets/Indexed_Array.jpg -------------------------------------------------------------------------------- /backend/php/assets/Multidimensional_Array.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/php/assets/Multidimensional_Array.jpg -------------------------------------------------------------------------------- /backend/php/assets/Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/php/assets/Output.png -------------------------------------------------------------------------------- /backend/php/assets/Types_of_Arrays_in_PHP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/php/assets/Types_of_Arrays_in_PHP.jpg -------------------------------------------------------------------------------- /backend/php/assets/php.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/php/assets/php.jpg -------------------------------------------------------------------------------- /backend/php/coding/factorial.php: -------------------------------------------------------------------------------- 1 | 0;) { 6 | $remainder = $number % $i; 7 | if (!$remainder) { 8 | $divisors[] = $i; 9 | } 10 | } 11 | return $divisors; 12 | }; 13 | 14 | $getSubsets = function ($divisors) { 15 | $subsets = [[]]; 16 | foreach ($divisors as $division) { 17 | foreach ($subsets as $subset) { 18 | $subsets[] = array_merge([$division], $subset); 19 | } 20 | } 21 | return $subsets; 22 | }; 23 | 24 | $isRoom = function($subsets, $room) { 25 | foreach ($subsets as $subset) { 26 | if (array_sum($subset) == $room) { 27 | return false; 28 | } 29 | } 30 | return true; 31 | }; 32 | 33 | for ($i = 0; ++$i < 101;) { 34 | $divisors = $getDivisors($i); 35 | 36 | $sum = array_sum($divisors); 37 | 38 | if ($sum <= $i) { 39 | continue; 40 | } 41 | 42 | if ($isRoom($getSubsets($divisors), $i)) { 43 | echo $i . "\n"; 44 | exit; 45 | } 46 | } 47 | 48 | echo "?\n"; 49 | 50 | 51 | -------------------------------------------------------------------------------- /backend/php/coding/integer-length.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /backend/php/coding/reverse-words-in-string.php: -------------------------------------------------------------------------------- 1 | lst[j]: 7 | # swap values 8 | lst[i], lst[j] = lst[j], lst[i] 9 | return lst 10 | 11 | class Test(unittest.TestCase): 12 | def testUnsortedSmall(self): 13 | self.assertEqual([1,2,3,4], bubblesort([4,3,2,1])) 14 | 15 | def testSortedSmall(self): 16 | self.assertEqual([1,2,3,4], bubblesort([1,2,3,4])) 17 | 18 | def testUnsortedLarge(self): 19 | self.assertEqual([1,2,3,4,5,6,7,8,9,10], bubblesort([6,3,4,8,7,9,5,10,1,2])) 20 | 21 | def testSortedLarge(self): 22 | self.assertEqual([1,2,3,4,5,6,7,8,9,10], bubblesort([1,2,3,4,5,6,7,8,9,10])) 23 | 24 | def testSingleInput(self): 25 | self.assertEqual([1], bubblesort([1])) 26 | 27 | def testBlankInput(self): 28 | self.assertEqual([], bubblesort([])) 29 | 30 | if __name__ == '__main__': 31 | unittest.main() 32 | -------------------------------------------------------------------------------- /backend/python/coding/closetsum.py: -------------------------------------------------------------------------------- 1 | # In given A, find three elements whose sum is closest to give value. 2 | #author: Pankaj Kumar 3 | 4 | import sys 5 | def threeSumClosest(A, B): 6 | i , n = 0 , len(A) 7 | A = sorted(A) 8 | diff = sys.maxint 9 | close_sum = 0 10 | while i <= n-3: 11 | j , k = i+1 , n-1 12 | sum = A[i] + A[j] + A[k] 13 | if sum == B: 14 | return sum 15 | if diff > abs(sum - B): 16 | diff += abs(sum-B) 17 | close_sum = sum 18 | if sum < B: 19 | j += 1 20 | else: 21 | k -= 1 22 | i += 1 23 | return close_sum 24 | print threeSumClosest([-1, 2, 1, -4], 1) 25 | -------------------------------------------------------------------------------- /backend/python/coding/convert-array.py: -------------------------------------------------------------------------------- 1 | """solution to the convert array problem""" 2 | 3 | def f(arr): 4 | """sorts the array by numbers in place using constant extra space""" 5 | 6 | position = 0 7 | for i in xrange(len(arr) / 3): 8 | gap = (len(arr) - position) / 3 9 | arr.insert(position + 1, arr.pop(position + gap * 1)) 10 | arr.insert(position + 2, arr.pop(position + gap * 2)) 11 | position += 3 12 | 13 | return arr 14 | -------------------------------------------------------------------------------- /backend/python/coding/csv-parsing.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """solution to the csv parsing problem, handling quotes and numric values""" 4 | 5 | def convert_to_number(value): 6 | """converts the passed over string to a number, if possible""" 7 | 8 | try: 9 | return int(value) 10 | except ValueError: 11 | pass 12 | 13 | return value 14 | 15 | def csv_parsing(csv): 16 | """returns list of string/numeric csv values""" 17 | 18 | count = 0 19 | values = [] 20 | pos = 0 21 | while pos < len(csv): 22 | if csv[pos] == ',': # skip comma from previous iteration 23 | pos += 1 24 | 25 | values.insert(count, '') 26 | while pos < len(csv) and csv[pos] != ',': 27 | if csv[pos] == '"' or csv[pos] == "'": # handle quoted strings 28 | first_quote = pos 29 | pos += 1 30 | 31 | while pos < len(csv) and csv[pos] != csv[first_quote]: 32 | values[count] += csv[pos] 33 | pos += 1 34 | 35 | else: 36 | values[count] += csv[pos] 37 | 38 | pos += 1 39 | 40 | #if the value is numeric, this will convert it. 41 | values[count] = convert_to_number(values[count]) 42 | 43 | count += 1 44 | pos += 1 45 | 46 | return values 47 | -------------------------------------------------------------------------------- /backend/python/coding/even-occuring-element.py: -------------------------------------------------------------------------------- 1 | def even_occuring_element(arr): 2 | """Returns the even occuring element within a list of integers""" 3 | 4 | dict = {} 5 | for num in arr: 6 | if num in dict: 7 | dict[num] += 1 8 | else: 9 | dict[num] = 1 10 | 11 | for num in dict: 12 | if not dict[num] & 1: # bitwise check for parity. 13 | return num 14 | -------------------------------------------------------------------------------- /backend/python/coding/factorial.py: -------------------------------------------------------------------------------- 1 | """solutions to the factorial problem""" 2 | 3 | def factorial_iterative(num): 4 | """returns the factorial of num using an iterative method.""" 5 | 6 | factor = 1 7 | 8 | for i in xrange(1, num + 1): 9 | factor *= i 10 | 11 | return factor 12 | 13 | def factorial_reduce(num): 14 | """returns the factorial of num using a reduce (shortest method).""" 15 | 16 | return reduce(lambda x, y: x * y, range(1, num + 1)) 17 | 18 | def factorial_recursive(num): 19 | """returns the factorial of num using a recursive method.""" 20 | 21 | if num == 1: 22 | return 1 23 | 24 | return num * factorial_recursive(num -1) 25 | -------------------------------------------------------------------------------- /backend/python/coding/fibonacci.py: -------------------------------------------------------------------------------- 1 | """solutions to the fibonacci problem""" 2 | 3 | def fibonacci_iterative(limit): 4 | """fibonacci sequence using an iterative approach.""" 5 | 6 | a, b = 0, 1 7 | for i in xrange(limit): 8 | a, b = b, a + b 9 | 10 | return a 11 | 12 | def fibonacci_recursive(limit): 13 | """fibonacci sequence using a recusive approach.""" 14 | 15 | if limit <= 1: 16 | return limit 17 | 18 | return fibonacci_recursive(limit - 1) + fibonacci_recursive(limit - 2) 19 | 20 | def fibonacci_reduce(limit): 21 | """fibonacci sequence using reduce (shortest option).""" 22 | 23 | return reduce(lambda x, y: x + [x[y] + x[y - 1]], range(1, limit), [0, 1])[-1] 24 | 25 | def fibonacci_comprehension(limit): 26 | """fibonacci sequence using a list comprehension.""" 27 | 28 | sequence = [0, 1] 29 | 30 | [sequence.append(sequence[i] + sequence[i-1]) for i in range(1, limit)] 31 | 32 | return sequence[-1] 33 | -------------------------------------------------------------------------------- /backend/python/coding/find-missing-element.py: -------------------------------------------------------------------------------- 1 | """finds the missing element in the shuffled list""" 2 | 3 | def difference_set(orig, shuffled): 4 | """finds the missing element using a set.""" 5 | 6 | return set(orig).difference(set(shuffled)).pop() 7 | 8 | def difference_iterative(orig, shuffled): 9 | """finds the missing element by iterating over the list""" 10 | 11 | for x in orig: 12 | if not x in shuffled: 13 | return x 14 | -------------------------------------------------------------------------------- /backend/python/coding/first-non-repeated-character.py: -------------------------------------------------------------------------------- 1 | """solution for the first-non-repeated-character problem""" 2 | 3 | def first_non_repeated_character(str): 4 | """finds the first character in a string that's not repreated""" 5 | 6 | for i, char in enumerate(str): 7 | if i - 1 >= 0 and char == str[i - 1]: 8 | continue 9 | if i + 1 < len(str) and char == str[i + 1]: 10 | continue 11 | 12 | return char 13 | -------------------------------------------------------------------------------- /backend/python/coding/flatten-array.py: -------------------------------------------------------------------------------- 1 | """accepts a multi dimensional array and returns a flattened version""" 2 | 3 | def flatten_array(orig): 4 | """returns a new, flattened, list""" 5 | 6 | flattened_list = [] 7 | 8 | for item in orig: 9 | if isinstance(item, list): 10 | flattened_list += flatten_array(item) 11 | else: 12 | flattened_list.append(item) 13 | 14 | return flattened_list 15 | 16 | def flatten_in_place(orig): 17 | """flattens a given list in place""" 18 | 19 | is_flattened = False 20 | 21 | while not is_flattened: # iterating until no more lists are found 22 | 23 | is_flattened = True 24 | for i, item in enumerate(orig): 25 | 26 | if isinstance(item, list): 27 | is_flattened = False 28 | orig = orig[:i] + item + orig[i + 1:] 29 | 30 | return orig 31 | -------------------------------------------------------------------------------- /backend/python/coding/largest-continuous-sum.py: -------------------------------------------------------------------------------- 1 | """solution to the largest-continuous-sum problem""" 2 | 3 | def largest_continuous_sum(arr): 4 | """returns the highest sum of a continuous sequence in a given list""" 5 | 6 | largest = 0 7 | queue = [] 8 | for num in arr: 9 | if len(queue) > 0 and queue[-1] + 1 != num: 10 | sum = reduce(lambda x, y: x + y, queue) 11 | if largest < sum: 12 | largest = sum 13 | queue = [] 14 | 15 | queue.append(num) 16 | 17 | return largest 18 | -------------------------------------------------------------------------------- /backend/python/coding/multiples-of-3-and-5.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | from math import ceil 3 | from itertools import combinations 4 | from operator import mul 5 | 6 | # Sum of multiples of 3 or 5 under 1000, simplified: 7 | # print (3 * 333 * 334 / 2) + (5 * 199 * 200 / 2) - (15 * 66 * 67 / 2) 8 | 9 | def getSumOfMultiple(num, limit): 10 | return int((ceil(limit / num) - 1) * ceil(limit / num) * num / 2) 11 | 12 | def getSumOfMultiples(multiples, limit): 13 | result = 0 14 | sign = 1 15 | for i in range(1, len(multiples) + 1): 16 | for x in combinations(multiples, i): 17 | result += sign * getSumOfMultiple(reduce(mul, x, 1), limit) 18 | sign *= -1 19 | return result 20 | 21 | def getSumOfMultiples(): 22 | count=0 23 | for i in range(1000): 24 | if i%3==0 or i%5==0: 25 | count+=i 26 | return count 27 | -------------------------------------------------------------------------------- /backend/python/coding/once.py: -------------------------------------------------------------------------------- 1 | class once: 2 | def __init__(self, func, times=1): 3 | self.times = int(times) 4 | self.func = func 5 | def __call__(self, *args, **kwargs): 6 | if self.times > 0: 7 | self.times -= 1 8 | return self.func(*args, **kwargs) 9 | -------------------------------------------------------------------------------- /backend/python/coding/prime-number.py: -------------------------------------------------------------------------------- 1 | from math import sqrt 2 | 3 | def is_prime(n): 4 | if n <= 1: 5 | return False 6 | elif n == 2: 7 | return True 8 | elif n % 2 == 0: 9 | return False 10 | for i in xrange(3, int(sqrt(n))+1, 2): 11 | if n % i == 0: 12 | return False 13 | return True 14 | -------------------------------------------------------------------------------- /backend/python/coding/quick-sort.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | 3 | def quickSort(lst): 4 | # List of 0 or 1 items is already sorted 5 | if len(lst) <= 1: 6 | return lst 7 | else: 8 | # Pivot can be chosen randomly 9 | pivotIndex = randint(0, len(lst)-1) 10 | pivot = lst[pivotIndex] 11 | # Elements lower than and greater than pivot 12 | lesser, greater = [], [] 13 | 14 | for index in range(len(lst)): 15 | # Don't do anything if you're at the pivot 16 | if index == pivotIndex: 17 | pass 18 | else: 19 | # Sort elements into < pivot and >= pivot 20 | el = lst[index] 21 | if el < pivot: 22 | lesser.append(el) 23 | else: 24 | greater.append(el) 25 | 26 | # Sort lesser and greater, concatenate results 27 | return quickSort(lesser) + [pivot] + quickSort(greater) 28 | -------------------------------------------------------------------------------- /backend/python/coding/shortest-fizz-buzz.py: -------------------------------------------------------------------------------- 1 | for i in range(1,101): 2 | o=''if i%3else'Fizz' 3 | if i%5==0:o+='Buzz' 4 | print(o if o else i) 5 | -------------------------------------------------------------------------------- /backend/python/coding/sum-of-array-plus-one.py: -------------------------------------------------------------------------------- 1 | def plusOneSum(arr): 2 | """returns the sum of the integers after adding 1 to each element""" 3 | return sum(arr)+len(arr) -------------------------------------------------------------------------------- /backend/python/coding/tree-level-order-print.py: -------------------------------------------------------------------------------- 1 | class Node(object): 2 | def __init__(self, value): 3 | self.value = value 4 | self.left = None 5 | self.right = None 6 | 7 | 8 | def traverse_levelorder(root): 9 | if not root: 10 | return 11 | q = [root, True] # Use True as sentinel for end of row 12 | while len(q) > 0: 13 | node = q.pop(0) 14 | print node.value, 15 | if node.left: 16 | q.append(node.left) 17 | if node.right: 18 | q.append(node.right) 19 | if q[0] is True: # End of row 20 | q.pop(0) 21 | if len(q) > 0: 22 | q.append(True) 23 | print 24 | -------------------------------------------------------------------------------- /backend/python/numpy/assets/numpy.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/python/numpy/assets/numpy.jpeg -------------------------------------------------------------------------------- /backend/python/numpy/assets/uses_of_numpy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/python/numpy/assets/uses_of_numpy.jpg -------------------------------------------------------------------------------- /backend/python/pandas/assets/delete_rowcolumn_from_dataframe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/python/pandas/assets/delete_rowcolumn_from_dataframe.jpg -------------------------------------------------------------------------------- /backend/python/pandas/assets/get_the_items_that_are_not_common_to_both_the_given_series_A_and_B.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/python/pandas/assets/get_the_items_that_are_not_common_to_both_the_given_series_A_and_B.jpg -------------------------------------------------------------------------------- /backend/python/pandas/assets/pandas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/python/pandas/assets/pandas.png -------------------------------------------------------------------------------- /backend/web-services/assets/JAXB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/JAXB.png -------------------------------------------------------------------------------- /backend/web-services/assets/Java_Web_Service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/Java_Web_Service.png -------------------------------------------------------------------------------- /backend/web-services/assets/Restful_Web_Service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/Restful_Web_Service.png -------------------------------------------------------------------------------- /backend/web-services/assets/SOAP_Elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/SOAP_Elements.png -------------------------------------------------------------------------------- /backend/web-services/assets/UDDI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/UDDI.png -------------------------------------------------------------------------------- /backend/web-services/assets/Web_Service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/Web_Service.png -------------------------------------------------------------------------------- /backend/web-services/assets/Web_Service_Protocol_Stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/Web_Service_Protocol_Stack.png -------------------------------------------------------------------------------- /backend/web-services/assets/Web_Service_roles__operation____artifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/Web_Service_roles__operation____artifacts.png -------------------------------------------------------------------------------- /backend/web-services/assets/Web_Service_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/Web_Service_type.png -------------------------------------------------------------------------------- /backend/web-services/assets/soap_advantages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/soap_advantages.png -------------------------------------------------------------------------------- /backend/web-services/assets/web-services.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/web-services.jpeg -------------------------------------------------------------------------------- /backend/web-services/assets/wsdl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/wsdl.png -------------------------------------------------------------------------------- /backend/web-services/assets/xml-rpc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/web-services/assets/xml-rpc.png -------------------------------------------------------------------------------- /backend/websocket/assets/long-polling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/websocket/assets/long-polling.png -------------------------------------------------------------------------------- /backend/websocket/assets/short-polling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/websocket/assets/short-polling.png -------------------------------------------------------------------------------- /backend/websocket/assets/websocket.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/backend/websocket/assets/websocket.jpeg -------------------------------------------------------------------------------- /basics/algorithms/assets/Big_O.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/Big_O.png -------------------------------------------------------------------------------- /basics/algorithms/assets/Dijkstra's_Algorithm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/Dijkstra's_Algorithm.png -------------------------------------------------------------------------------- /basics/algorithms/assets/Divide_and_Conquer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/Divide_and_Conquer.png -------------------------------------------------------------------------------- /basics/algorithms/assets/Dynamic_Programming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/Dynamic_Programming.png -------------------------------------------------------------------------------- /basics/algorithms/assets/Linear_Search_Algorithm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/Linear_Search_Algorithm.png -------------------------------------------------------------------------------- /basics/algorithms/assets/Need_For_Algorithms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/Need_For_Algorithms.png -------------------------------------------------------------------------------- /basics/algorithms/assets/Omega.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/Omega.png -------------------------------------------------------------------------------- /basics/algorithms/assets/The_Theta_Notation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/The_Theta_Notation.png -------------------------------------------------------------------------------- /basics/algorithms/assets/What_is_an_Algorithm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/What_is_an_Algorithm.png -------------------------------------------------------------------------------- /basics/algorithms/assets/algo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/algo.jpg -------------------------------------------------------------------------------- /basics/algorithms/assets/merge_sort_algorithm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/merge_sort_algorithm.png -------------------------------------------------------------------------------- /basics/algorithms/assets/quicksort.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/algorithms/assets/quicksort.gif -------------------------------------------------------------------------------- /basics/cpp/assets/Class_in_C__.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cpp/assets/Class_in_C__.png -------------------------------------------------------------------------------- /basics/cpp/assets/Inheritance_in_C__.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cpp/assets/Inheritance_in_C__.png -------------------------------------------------------------------------------- /basics/cpp/assets/Polymorphism_in_C__.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cpp/assets/Polymorphism_in_C__.png -------------------------------------------------------------------------------- /basics/cpp/assets/cpp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cpp/assets/cpp.jpg -------------------------------------------------------------------------------- /basics/cpp/coding/ShopInCandyStore.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | int t; cin>>t; 6 | while(t--) 7 | { 8 | int n,k; cin>>n>>k; long int a[n],min=0,max=0,c=0; 9 | for(int i=0;i>a[i]; 10 | sort(a,a+n); 11 | int x=(n/(k+1)); if((n%(k+1))>0) {x++;} 12 | 13 | for(int i=0;i // std::vector 5 | #include // std::move 6 | 7 | std::vector spiral(unsigned int height, unsigned int width, int row, int column) { 8 | enum { 9 | Up, Left, Down, Right 10 | } currentDirection = Up; 11 | unsigned int maxLength = 1, 12 | length = 0; 13 | std::vector visited; 14 | 15 | while(visited.size() != height*width) { 16 | if(width >= column && column > 0) 17 | if(height >= row && row > 0) 18 | visited.push_back(column + (row - 1)*width); 19 | 20 | switch(currentDirection) { 21 | case Up: 22 | --row; 23 | break; 24 | case Left: 25 | --column; 26 | break; 27 | case Down: 28 | ++row; 29 | break; 30 | case Right: 31 | ++column; 32 | break; 33 | } 34 | 35 | ++length; 36 | 37 | if(length == maxLength) { 38 | length = 0; 39 | 40 | switch(currentDirection) { 41 | case Up: 42 | currentDirection = Left; 43 | break; 44 | case Left: 45 | currentDirection = Down; 46 | ++maxLength; 47 | break; 48 | case Down: 49 | currentDirection = Right; 50 | break; 51 | case Right: 52 | currentDirection = Up; 53 | ++maxLength; 54 | break; 55 | } 56 | } 57 | } 58 | 59 | return std::move(visited); 60 | } 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /basics/cpp/coding/stack.hpp: -------------------------------------------------------------------------------- 1 | #ifndef STACK_HPP_INCLUDED 2 | #define STACK_HPP_INCLUDED 3 | 4 | #include // std::forward 5 | #include // std::move 6 | #include // std::runtime_error 7 | 8 | class empty_stack : public std::runtime_error { 9 | public: 10 | empty_stack(std::string const& what_arg) : std::runtime_error{what_arg} {}; 11 | }; 12 | 13 | template 14 | class Stack { 15 | public: 16 | Stack() : head{nullptr} {}; 17 | ~Stack(); 18 | 19 | template 20 | void add(U&&); 21 | T remove(); 22 | 23 | inline bool empty() const { return head == nullptr; }; 24 | 25 | private: 26 | struct Node { 27 | T data; 28 | Node* next; 29 | 30 | template 31 | Node(U&& d, Node* n) : data{std::forward(d)}, next{n} {}; 32 | }; 33 | 34 | Node* head; 35 | }; 36 | 37 | template 38 | Stack::~Stack() { 39 | // Rewriting functionality of remove here avoids a call to the move 40 | // constructor for each element in the stack. For code golf, use: 41 | // while(!empty()) remove(); 42 | while(!empty()) { 43 | auto old_head = head; 44 | head = head->next; 45 | delete old_head; 46 | } 47 | } 48 | 49 | template 50 | template 51 | void Stack::add(U&& t) { 52 | head = new Node{std::forward(t), head}; 53 | } 54 | 55 | template 56 | T Stack::remove() { 57 | if(empty()) 58 | throw empty_stack{"Remove called on empty stack."}; 59 | 60 | auto old_head = head; 61 | auto old_data = std::move(head->data); 62 | head = head->next; 63 | 64 | delete old_head; 65 | return old_data; 66 | } 67 | 68 | #endif // STACK_HPP_INCLUDED 69 | -------------------------------------------------------------------------------- /basics/cyber/assets/ARP_poisoning.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/ARP_poisoning.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Black_Hat__White_Hat_and_Grey_Hat_Hackers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Black_Hat__White_Hat_and_Grey_Hat_Hackers.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Botnet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Botnet.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Cyber_Security.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Cyber_Security.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Cyber_Security_3-hashing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Cyber_Security_3-hashing.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Cyber_Security_30-Encryption.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Cyber_Security_30-Encryption.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Cyber_Security_objectives.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Cyber_Security_objectives.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/DNS_attack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/DNS_attack.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Firewall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Firewall.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Honeypot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Honeypot.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Polymorphic_viruses.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Polymorphic_viruses.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Risk___Likelihood_of_a_threat__Vulnerability_Impact.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Risk___Likelihood_of_a_threat__Vulnerability_Impact.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/SQL_injection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/SQL_injection.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Shoulder_Surfing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Shoulder_Surfing.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/System_Hardening.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/System_Hardening.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Tracking_cookies.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Tracking_cookies.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Two-factor_authentication_(2FA).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Two-factor_authentication_(2FA).jpg -------------------------------------------------------------------------------- /basics/cyber/assets/VPN.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/VPN.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/Vulnerability_Assessment_and_Penetration_Testing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/Vulnerability_Assessment_and_Penetration_Testing.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/XSS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/XSS.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/brute-force-in-cyber-security.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/brute-force-in-cyber-security.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/encryption_function.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/encryption_function.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/hids_vs_nids.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/hids_vs_nids.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/ids-vs-ips.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/ids-vs-ips.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/man-middle-attack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/man-middle-attack.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/network_sniffing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/network_sniffing.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/phishing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/phishing.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/phishing_vs_spear_phishing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/phishing_vs_spear_phishing.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/vlan-vs_-vpn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/vlan-vs_-vpn.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/what-is-ddos-attack-and-how-to-prevent-it.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/what-is-ddos-attack-and-how-to-prevent-it.jpg -------------------------------------------------------------------------------- /basics/cyber/assets/which-is-more-reliable-ssl-or-https.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/cyber/assets/which-is-more-reliable-ssl-or-https.jpg -------------------------------------------------------------------------------- /basics/data-structures/assets/LRU-cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/LRU-cache.png -------------------------------------------------------------------------------- /basics/data-structures/assets/adjacency-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/adjacency-list.png -------------------------------------------------------------------------------- /basics/data-structures/assets/adjacency-matrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/adjacency-matrix.png -------------------------------------------------------------------------------- /basics/data-structures/assets/applications-data-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/applications-data-structure.png -------------------------------------------------------------------------------- /basics/data-structures/assets/binary-search-tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/binary-search-tree.png -------------------------------------------------------------------------------- /basics/data-structures/assets/binary-tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/binary-tree.png -------------------------------------------------------------------------------- /basics/data-structures/assets/data-structure-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/data-structure-types.png -------------------------------------------------------------------------------- /basics/data-structures/assets/data_structure.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/data_structure.jpg -------------------------------------------------------------------------------- /basics/data-structures/assets/graph-data-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/graph-data-structure.png -------------------------------------------------------------------------------- /basics/data-structures/assets/left-view-binary-tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/left-view-binary-tree.png -------------------------------------------------------------------------------- /basics/data-structures/assets/linear-vs-non-linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/linear-vs-non-linear.png -------------------------------------------------------------------------------- /basics/data-structures/assets/linked-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/linked-list.png -------------------------------------------------------------------------------- /basics/data-structures/assets/multidimensional-array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/multidimensional-array.png -------------------------------------------------------------------------------- /basics/data-structures/assets/postorder-traversal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/postorder-traversal.png -------------------------------------------------------------------------------- /basics/data-structures/assets/queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/queue.png -------------------------------------------------------------------------------- /basics/data-structures/assets/stack-vs-queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/stack-vs-queue.png -------------------------------------------------------------------------------- /basics/data-structures/assets/stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/stack.png -------------------------------------------------------------------------------- /basics/data-structures/assets/tree-data-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/data-structures/assets/tree-data-structure.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/Bridge_design_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/Bridge_design_pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/Chain_of_Responsibility_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/Chain_of_Responsibility_pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/Class_Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/Class_Diagram.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/Command_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/Command_pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/Decorator_Design_Pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/Decorator_Design_Pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/Factory_Design_Pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/Factory_Design_Pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/MVC_design_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/MVC_design_pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/Observer_design_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/Observer_design_pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/Proxy_Design_Pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/Proxy_Design_Pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/SOLID_principles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/SOLID_principles.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/What_are_design_patterns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/What_are_design_patterns.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/design-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/design-pattern.png -------------------------------------------------------------------------------- /basics/design-patterns/assets/types_of_design_patterns_in_java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/design-patterns/assets/types_of_design_patterns_in_java.png -------------------------------------------------------------------------------- /basics/network/assets/ARP_Protocol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/ARP_Protocol.png -------------------------------------------------------------------------------- /basics/network/assets/Bus_Topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Bus_Topology.png -------------------------------------------------------------------------------- /basics/network/assets/Firewall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Firewall.png -------------------------------------------------------------------------------- /basics/network/assets/Hybird_Topology.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Hybird_Topology.jpg -------------------------------------------------------------------------------- /basics/network/assets/LAN_(Local_Area_Network).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/LAN_(Local_Area_Network).png -------------------------------------------------------------------------------- /basics/network/assets/Layers_of_OSI_Model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Layers_of_OSI_Model.png -------------------------------------------------------------------------------- /basics/network/assets/Layers_of_TCP_IP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Layers_of_TCP_IP.png -------------------------------------------------------------------------------- /basics/network/assets/Mesh_Topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Mesh_Topology.png -------------------------------------------------------------------------------- /basics/network/assets/Network_Types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Network_Types.png -------------------------------------------------------------------------------- /basics/network/assets/Nodes_and_Links.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Nodes_and_Links.png -------------------------------------------------------------------------------- /basics/network/assets/OSI_Vs_TCP_IP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/OSI_Vs_TCP_IP.png -------------------------------------------------------------------------------- /basics/network/assets/Ring_Topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Ring_Topology.png -------------------------------------------------------------------------------- /basics/network/assets/SMTP_Protocol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/SMTP_Protocol.png -------------------------------------------------------------------------------- /basics/network/assets/Star_Topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Star_Topology.png -------------------------------------------------------------------------------- /basics/network/assets/Subnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Subnet.png -------------------------------------------------------------------------------- /basics/network/assets/TCP_Vs_UDP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/TCP_Vs_UDP.png -------------------------------------------------------------------------------- /basics/network/assets/Tree_Topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/Tree_Topology.png -------------------------------------------------------------------------------- /basics/network/assets/VPN_(Virtual_Private_Network).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/VPN_(Virtual_Private_Network).png -------------------------------------------------------------------------------- /basics/network/assets/google.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/google.jpg -------------------------------------------------------------------------------- /basics/network/assets/network.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/network/assets/network.jpg -------------------------------------------------------------------------------- /basics/oops/assets/constructor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/constructor.png -------------------------------------------------------------------------------- /basics/oops/assets/encapsulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/encapsulation.png -------------------------------------------------------------------------------- /basics/oops/assets/inheritance-with-ex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/inheritance-with-ex.png -------------------------------------------------------------------------------- /basics/oops/assets/oop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/oop.jpg -------------------------------------------------------------------------------- /basics/oops/assets/oops-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/oops-features.png -------------------------------------------------------------------------------- /basics/oops/assets/polymorphism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/polymorphism.png -------------------------------------------------------------------------------- /basics/oops/assets/programming-paradigms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/programming-paradigms.png -------------------------------------------------------------------------------- /basics/oops/assets/superclass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/superclass.png -------------------------------------------------------------------------------- /basics/oops/assets/types_of_inheritance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/types_of_inheritance.png -------------------------------------------------------------------------------- /basics/oops/assets/types_of_polymorphism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/oops/assets/types_of_polymorphism.png -------------------------------------------------------------------------------- /basics/os/assets/OS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/OS.png -------------------------------------------------------------------------------- /basics/os/assets/OS_Process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/OS_Process.png -------------------------------------------------------------------------------- /basics/os/assets/Process_and_Thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/Process_and_Thread.png -------------------------------------------------------------------------------- /basics/os/assets/RAID_Level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/RAID_Level.png -------------------------------------------------------------------------------- /basics/os/assets/RTOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/RTOS.png -------------------------------------------------------------------------------- /basics/os/assets/asymmetric_cluttering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/asymmetric_cluttering.png -------------------------------------------------------------------------------- /basics/os/assets/boostrap_program_in_os.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/boostrap_program_in_os.png -------------------------------------------------------------------------------- /basics/os/assets/kernel-os.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/kernel-os.png -------------------------------------------------------------------------------- /basics/os/assets/kernel_oS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/kernel_oS.png -------------------------------------------------------------------------------- /basics/os/assets/monolithic_and_microkernel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/monolithic_and_microkernel.png -------------------------------------------------------------------------------- /basics/os/assets/multiprocessing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/multiprocessing.png -------------------------------------------------------------------------------- /basics/os/assets/multiprogramming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/multiprogramming.png -------------------------------------------------------------------------------- /basics/os/assets/multitasking-os.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/multitasking-os.png -------------------------------------------------------------------------------- /basics/os/assets/scheduling-algorithm-os.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/scheduling-algorithm-os.png -------------------------------------------------------------------------------- /basics/os/assets/states_of_process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/states_of_process.png -------------------------------------------------------------------------------- /basics/os/assets/thread_in_os.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/thread_in_os.png -------------------------------------------------------------------------------- /basics/os/assets/virtual_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/basics/os/assets/virtual_memory.png -------------------------------------------------------------------------------- /database/mongodb/assets/Mongos.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mongodb/assets/Mongos.jpg -------------------------------------------------------------------------------- /database/mongodb/assets/Non_sharded_client_connection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mongodb/assets/Non_sharded_client_connection.jpg -------------------------------------------------------------------------------- /database/mongodb/assets/aggregation-framework.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mongodb/assets/aggregation-framework.jpg -------------------------------------------------------------------------------- /database/mongodb/assets/mongodb_aggregation_pipeline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mongodb/assets/mongodb_aggregation_pipeline.jpg -------------------------------------------------------------------------------- /database/mongodb/assets/mongologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mongodb/assets/mongologo.png -------------------------------------------------------------------------------- /database/mongodb/assets/replication_architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mongodb/assets/replication_architecture.jpg -------------------------------------------------------------------------------- /database/mongodb/assets/sharded_client_connection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mongodb/assets/sharded_client_connection.jpg -------------------------------------------------------------------------------- /database/mysql/assets/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mysql/assets/architecture.png -------------------------------------------------------------------------------- /database/mysql/assets/mysql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mysql/assets/mysql.png -------------------------------------------------------------------------------- /database/mysql/assets/sharding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/mysql/assets/sharding.png -------------------------------------------------------------------------------- /database/postgresql/assets/acid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/postgresql/assets/acid.jpg -------------------------------------------------------------------------------- /database/postgresql/assets/architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/postgresql/assets/architecture.jpg -------------------------------------------------------------------------------- /database/postgresql/assets/parallel_queries_in_PostgreSQL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/postgresql/assets/parallel_queries_in_PostgreSQL.jpg -------------------------------------------------------------------------------- /database/postgresql/assets/postgres.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/postgresql/assets/postgres.jpeg -------------------------------------------------------------------------------- /database/sql/assets/Books_Table_(2nd_Normal_Form).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/Books_Table_(2nd_Normal_Form).png -------------------------------------------------------------------------------- /database/sql/assets/Entities_and_Relationships.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/Entities_and_Relationships.jpg -------------------------------------------------------------------------------- /database/sql/assets/OLTP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/OLTP.jpg -------------------------------------------------------------------------------- /database/sql/assets/SQL_View.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/SQL_View.jpg -------------------------------------------------------------------------------- /database/sql/assets/Salutations_Table_(3rd_Normal_Form).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/Salutations_Table_(3rd_Normal_Form).png -------------------------------------------------------------------------------- /database/sql/assets/Stored_Procedure.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/Stored_Procedure.jpg -------------------------------------------------------------------------------- /database/sql/assets/Students_Table(3rd_Normal_Form).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/Students_Table(3rd_Normal_Form).png -------------------------------------------------------------------------------- /database/sql/assets/Students_Table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/Students_Table.png -------------------------------------------------------------------------------- /database/sql/assets/Students_Table_(1st_Normal_Form).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/Students_Table_(1st_Normal_Form).png -------------------------------------------------------------------------------- /database/sql/assets/Students_Table_(2nd_Normal_Form).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/Students_Table_(2nd_Normal_Form).png -------------------------------------------------------------------------------- /database/sql/assets/cross_join.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/cross_join.jpg -------------------------------------------------------------------------------- /database/sql/assets/dbms_vs_rdbms.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/dbms_vs_rdbms.jpg -------------------------------------------------------------------------------- /database/sql/assets/differences_between_OLTP_and_OLAP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/differences_between_OLTP_and_OLAP.jpg -------------------------------------------------------------------------------- /database/sql/assets/sql.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/sql.jpg -------------------------------------------------------------------------------- /database/sql/assets/sql_join.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/sql_join.jpg -------------------------------------------------------------------------------- /database/sql/assets/sql_vs_mysql.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/database/sql/assets/sql_vs_mysql.jpg -------------------------------------------------------------------------------- /devops/assets/Agile_Methodology.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/Agile_Methodology.jpg -------------------------------------------------------------------------------- /devops/assets/Architecture_of_Jenkins.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/Architecture_of_Jenkins.jpg -------------------------------------------------------------------------------- /devops/assets/Blue_Green_Deploy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/Blue_Green_Deploy.gif -------------------------------------------------------------------------------- /devops/assets/DevOps_Configuration_Management.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/DevOps_Configuration_Management.jpg -------------------------------------------------------------------------------- /devops/assets/DevOps_Continuous_Integration_(CI).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/DevOps_Continuous_Integration_(CI).jpg -------------------------------------------------------------------------------- /devops/assets/DevOps_Shift_left_to_reduce_failure_concept.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/DevOps_Shift_left_to_reduce_failure_concept.jpg -------------------------------------------------------------------------------- /devops/assets/DevOps_Tools.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/DevOps_Tools.jpg -------------------------------------------------------------------------------- /devops/assets/DevOps_pipeline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/DevOps_pipeline.jpg -------------------------------------------------------------------------------- /devops/assets/Difference_between_Continuous_Deployment_and_Continuous_Delivery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/Difference_between_Continuous_Deployment_and_Continuous_Delivery.jpg -------------------------------------------------------------------------------- /devops/assets/What_is_DevOps.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/What_is_DevOps.jpg -------------------------------------------------------------------------------- /devops/assets/devops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/devops.png -------------------------------------------------------------------------------- /devops/assets/phase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/assets/phase.png -------------------------------------------------------------------------------- /devops/docker/assets/Docker_File.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/docker/assets/Docker_File.png -------------------------------------------------------------------------------- /devops/docker/assets/Hypervisor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/docker/assets/Hypervisor.png -------------------------------------------------------------------------------- /devops/docker/assets/docker-container-lifecycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/docker/assets/docker-container-lifecycle.png -------------------------------------------------------------------------------- /devops/docker/assets/docker-container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/docker/assets/docker-container.png -------------------------------------------------------------------------------- /devops/docker/assets/docker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/docker/assets/docker.jpg -------------------------------------------------------------------------------- /devops/docker/assets/docker_components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/docker/assets/docker_components.png -------------------------------------------------------------------------------- /devops/golang/assets/Go_channels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/golang/assets/Go_channels.png -------------------------------------------------------------------------------- /devops/golang/assets/Golang_packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/golang/assets/Golang_packages.png -------------------------------------------------------------------------------- /devops/golang/assets/Golang_pointers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/golang/assets/Golang_pointers.png -------------------------------------------------------------------------------- /devops/golang/assets/How_can_we_check_if_the_Go_map_contains_a_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/golang/assets/How_can_we_check_if_the_Go_map_contains_a_key.png -------------------------------------------------------------------------------- /devops/golang/assets/golang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/golang/assets/golang.png -------------------------------------------------------------------------------- /devops/golang/assets/slice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/golang/assets/slice.png -------------------------------------------------------------------------------- /devops/golang/coding/longest-words.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | func longest(sentence string) string { 9 | longest := "" 10 | words := make([]string, 0) 11 | words = strings.Split(sentence, " ") 12 | 13 | for _, word := range words { 14 | if len(longest) < len(word) { 15 | longest = word 16 | } 17 | } 18 | 19 | return longest; 20 | } 21 | 22 | func main() { 23 | fmt.Println(longest("You are just an old antidisestablishmentarian")) 24 | } -------------------------------------------------------------------------------- /devops/golang/coding/merge-sort.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "math" 6 | ) 7 | 8 | func mergeSort(ary []int) []int { 9 | if len(ary) <= 1 { 10 | return ary 11 | } 12 | left := make([]int, 0) 13 | right := make([]int, 0) 14 | middle := math.Floor(float64(len(ary) / 2)) 15 | 16 | left = ary[0:int(middle)] 17 | right = ary[int(middle):] 18 | 19 | return merge(mergeSort(left), mergeSort(right)) 20 | } 21 | 22 | func merge(left, right []int) []int { 23 | 24 | result := make([]int, 0) 25 | 26 | for len(left) > 0 || len(right) > 0 { 27 | if len(left) > 0 && len(right) > 0 { 28 | if left[0] <= right[0] { 29 | result = append(result, left[0]) 30 | left = left[1:len(left)] 31 | } else { 32 | result = append(result, right[0]) 33 | right = right[1:len(right)] 34 | } 35 | } else if len(left) > 0 { 36 | result = append(result, left[0]) 37 | left = left[1:len(left)] 38 | } else { 39 | result = append(result, right[0]) 40 | right = right[1:len(right)] 41 | } 42 | } 43 | 44 | return result 45 | } 46 | 47 | func main() { 48 | random := []int{1,73,7,1,72,58,933,574,24,74,52} 49 | fmt.Println("Unsorted: ", random) 50 | random = mergeSort(random) 51 | fmt.Println("Sorted: ", random) 52 | } -------------------------------------------------------------------------------- /devops/golang/coding/multiples-of-3-or-5.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func findMultiples() int { 8 | sum := 0; 9 | for i := 0; i < 1000; i++ { 10 | if i % 3 == 0 || i % 5 == 0 { 11 | sum += i 12 | } 13 | } 14 | return sum 15 | 16 | } 17 | 18 | func main() { 19 | fmt.Println(findMultiples()) 20 | } -------------------------------------------------------------------------------- /devops/golang/coding/shortest-fizz-buzz.go: -------------------------------------------------------------------------------- 1 | package main;import f"fmt";func main(){p:=f.Print;for i:=1;i<101;i++{if i%3<1{p("Fizz")};if i%5<1{p("Buzz")};if i%3>0&&i%5>0{p(i)};p("\n")}} -------------------------------------------------------------------------------- /devops/golang/coding/stack.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "log" 7 | "sync" 8 | ) 9 | 10 | type Stack struct { 11 | lock sync.Mutex // concurrency-safe stack 12 | stack []int 13 | } 14 | 15 | func New() *Stack { 16 | return &Stack{ 17 | lock: sync.Mutex{}, 18 | stack: make([]int, 0), 19 | } 20 | } 21 | 22 | func (s *Stack) Push(n int) { 23 | s.lock.Lock() 24 | defer s.lock.Unlock() 25 | s.stack = append(s.stack, n) 26 | fmt.Printf("pushed %v to the stack \n", n) 27 | } 28 | 29 | func (s *Stack) Pop() (int, error) { 30 | s.lock.Lock() 31 | defer s.lock.Unlock() 32 | 33 | length := len(s.stack) 34 | if length == 0 { 35 | err := errors.New("stack is empty") 36 | return 0, err 37 | } 38 | 39 | // extract the last item in stack 40 | last := s.stack[length - 1] 41 | 42 | // remove the last item in stack 43 | s.stack = s.stack[:length - 1] 44 | 45 | fmt.Printf("removed %v from the stack \n", last) 46 | return last, nil 47 | } 48 | 49 | func main() { 50 | stack := New() 51 | wg := sync.WaitGroup{} 52 | concurrency := 3 53 | 54 | // concurrently push values to the stack 55 | wg.Add(concurrency) 56 | for i := 0; i < concurrency; i++ { 57 | go func(n int) { 58 | stack.Push(n + 10) 59 | wg.Done() 60 | }(i) 61 | } 62 | 63 | // sequentially pop value off the stack 64 | wg.Wait() 65 | for j := 0; j < 3; j++ { 66 | _, err := stack.Pop() 67 | if err != nil { 68 | log.Fatal(err) 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /devops/kubernetes/assets/Kubernetes_Cluster.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/kubernetes/assets/Kubernetes_Cluster.jpg -------------------------------------------------------------------------------- /devops/kubernetes/assets/Kubernetes_Workflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/kubernetes/assets/Kubernetes_Workflow.jpg -------------------------------------------------------------------------------- /devops/kubernetes/assets/Load_Balancer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/kubernetes/assets/Load_Balancer.jpg -------------------------------------------------------------------------------- /devops/kubernetes/assets/Pod_Network.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/kubernetes/assets/Pod_Network.jpg -------------------------------------------------------------------------------- /devops/kubernetes/assets/kubernetes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/devops/kubernetes/assets/kubernetes.jpg -------------------------------------------------------------------------------- /frontend/css/assets/Box_Model_in_CSS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/Box_Model_in_CSS.jpg -------------------------------------------------------------------------------- /frontend/css/assets/CSS_Margin_vs._Padding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/CSS_Margin_vs._Padding.png -------------------------------------------------------------------------------- /frontend/css/assets/CSS_Position_Property.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/CSS_Position_Property.jpg -------------------------------------------------------------------------------- /frontend/css/assets/CSS_Sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/CSS_Sprites.png -------------------------------------------------------------------------------- /frontend/css/assets/CSS_selectors_matched_against_the_elements_by_the_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/CSS_selectors_matched_against_the_elements_by_the_browser.png -------------------------------------------------------------------------------- /frontend/css/assets/DOM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/DOM.png -------------------------------------------------------------------------------- /frontend/css/assets/border_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/border_box.png -------------------------------------------------------------------------------- /frontend/css/assets/clear_property__1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/clear_property__1.png -------------------------------------------------------------------------------- /frontend/css/assets/clear_property__2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/clear_property__2.png -------------------------------------------------------------------------------- /frontend/css/assets/content_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/content_box.png -------------------------------------------------------------------------------- /frontend/css/assets/css-dom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/css-dom.png -------------------------------------------------------------------------------- /frontend/css/assets/css.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/css.jpg -------------------------------------------------------------------------------- /frontend/css/assets/flex-terminology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/flex-terminology.png -------------------------------------------------------------------------------- /frontend/css/assets/flex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/flex.png -------------------------------------------------------------------------------- /frontend/css/assets/grid-term.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/grid-term.jpg -------------------------------------------------------------------------------- /frontend/css/assets/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/grid.png -------------------------------------------------------------------------------- /frontend/css/assets/opacity_in_css3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/opacity_in_css3.png -------------------------------------------------------------------------------- /frontend/css/assets/z-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/css/assets/z-index.png -------------------------------------------------------------------------------- /frontend/es6/assets/Javascript-for-Python-Developers_Watermarked.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/es6/assets/Javascript-for-Python-Developers_Watermarked.webp -------------------------------------------------------------------------------- /frontend/es6/assets/es6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/es6/assets/es6.jpg -------------------------------------------------------------------------------- /frontend/html/assets/Artboard_1_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Artboard_1_2x.png -------------------------------------------------------------------------------- /frontend/html/assets/Artboard_2_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Artboard_2_2x.png -------------------------------------------------------------------------------- /frontend/html/assets/Bigger_Screen_(650px).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Bigger_Screen_(650px).png -------------------------------------------------------------------------------- /frontend/html/assets/Convert_the_below_data_into_Tabular_format_in_HTML5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Convert_the_below_data_into_Tabular_format_in_HTML5.png -------------------------------------------------------------------------------- /frontend/html/assets/Explain_HTML5_Graphics..png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Explain_HTML5_Graphics..png -------------------------------------------------------------------------------- /frontend/html/assets/Explain_Web_Components_and_it’s_usage..png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Explain_Web_Components_and_it’s_usage..png -------------------------------------------------------------------------------- /frontend/html/assets/For_any_other_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/For_any_other_screen.png -------------------------------------------------------------------------------- /frontend/html/assets/Geolocation_API.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Geolocation_API.png -------------------------------------------------------------------------------- /frontend/html/assets/How_to_specify_the_metadata_in_HTML5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/How_to_specify_the_metadata_in_HTML5.png -------------------------------------------------------------------------------- /frontend/html/assets/Image_List.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Image_List.png -------------------------------------------------------------------------------- /frontend/html/assets/Inline_and_block_elements_in_HTML5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Inline_and_block_elements_in_HTML5.png -------------------------------------------------------------------------------- /frontend/html/assets/Microdata_in_HTML5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Microdata_in_HTML5.png -------------------------------------------------------------------------------- /frontend/html/assets/Resolution_switching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/Resolution_switching.png -------------------------------------------------------------------------------- /frontend/html/assets/cell-padding-vs-cell-spacing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/cell-padding-vs-cell-spacing.png -------------------------------------------------------------------------------- /frontend/html/assets/css-styles-for-html5-element.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/css-styles-for-html5-element.png -------------------------------------------------------------------------------- /frontend/html/assets/explain-web-components-and-its-usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/explain-web-components-and-its-usage.png -------------------------------------------------------------------------------- /frontend/html/assets/html-intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/html-intro.png -------------------------------------------------------------------------------- /frontend/html/assets/html-output-tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/html-output-tag.png -------------------------------------------------------------------------------- /frontend/html/assets/html.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/html.jpg -------------------------------------------------------------------------------- /frontend/html/assets/html5-new-tags-in-media-elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/html5-new-tags-in-media-elements.png -------------------------------------------------------------------------------- /frontend/html/assets/is-datalist-and-select-tag-same.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/is-datalist-and-select-tag-same.png -------------------------------------------------------------------------------- /frontend/html/assets/progressive-rendering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/html/assets/progressive-rendering.png -------------------------------------------------------------------------------- /frontend/javascript/assets/dom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/dom.png -------------------------------------------------------------------------------- /frontend/javascript/assets/hoisting-in-js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/hoisting-in-js.png -------------------------------------------------------------------------------- /frontend/javascript/assets/js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/js.png -------------------------------------------------------------------------------- /frontend/javascript/assets/js_promise_resolve_reject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/js_promise_resolve_reject.png -------------------------------------------------------------------------------- /frontend/javascript/assets/js_promise_then_catch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/js_promise_then_catch.png -------------------------------------------------------------------------------- /frontend/javascript/assets/object_prototype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/object_prototype.png -------------------------------------------------------------------------------- /frontend/javascript/assets/passed_by_reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/passed_by_reference.png -------------------------------------------------------------------------------- /frontend/javascript/assets/passed_by_value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/passed_by_value.png -------------------------------------------------------------------------------- /frontend/javascript/assets/static_vs_dynamic_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/assets/static_vs_dynamic_typing.png -------------------------------------------------------------------------------- /frontend/javascript/coding/array-pair-sum.js: -------------------------------------------------------------------------------- 1 | module.exports = function arraypairsum (k, array) { 2 | var hash = {}; 3 | var pairs = []; 4 | 5 | // Iterate over the array, tracking the times each number appears. For each 6 | // new number, we calculate the difference to `k` and look up the number of 7 | // times that number has been seen and push those occurances in pairs output. 8 | array.forEach(function (number) { 9 | var diff = k - number; 10 | var len = hash[diff]; 11 | 12 | while (len--) { 13 | pairs.push([diff, number]); 14 | } 15 | 16 | hash[number] = (hash[number] + 1) || 1; 17 | }); 18 | 19 | return pairs; 20 | }; 21 | -------------------------------------------------------------------------------- /frontend/javascript/coding/balanced-brackets.js: -------------------------------------------------------------------------------- 1 | // Use an object to map sets of brackets to their opposites 2 | var brackets = { 3 | '(': ')', 4 | '{': '}', 5 | '[': ']' 6 | }; 7 | 8 | // On each input string, process it using the balance checker 9 | module.exports = function (string) { 10 | var stack = []; 11 | // Process every character on input 12 | for (var i = 0; i < string.length; i++) { 13 | if (brackets[stack[stack.length - 1]] === string[i]) { 14 | stack.pop(); 15 | } else { 16 | stack.push(string[i]); 17 | } 18 | } 19 | 20 | return !stack.length; 21 | }; 22 | -------------------------------------------------------------------------------- /frontend/javascript/coding/binary-search-tree-check.js: -------------------------------------------------------------------------------- 1 | //Method 4 (Using In-Order Traversal) 2 | //Reference: 3 | // http://www.geeksforgeeks.org/a-program-to-check-if-a-binary-tree-is-bst-or-not/ 4 | module.exports = function(bst) { 5 | if (!bst || bst.value == null) { 6 | return false; 7 | } 8 | 9 | var prev; 10 | 11 | return (function isBst(root) { 12 | if (!root) { 13 | return true; 14 | } 15 | 16 | if (!isBst(root.left)) { 17 | return false; 18 | } 19 | 20 | if (prev && prev.value >= root.value) { 21 | return false; 22 | } 23 | 24 | prev = root; 25 | 26 | return isBst(root.right); 27 | 28 | })(bst); 29 | }; -------------------------------------------------------------------------------- /frontend/javascript/coding/bubble-sort.js: -------------------------------------------------------------------------------- 1 | module.exports = function (array, compare) { 2 | // Not an array, empty or array of 1 is already sorted 3 | if (!Array.isArray(array) || array.length < 2) { 4 | return array; 5 | } 6 | 7 | var swap = function (array, first, second) { 8 | var temp = array[first]; 9 | array[first] = array[second]; 10 | array[second] = temp; 11 | return array; 12 | }; 13 | 14 | // Create a compare func if not passed in 15 | if (typeof compare !== 'function') { 16 | compare = function (a, b) { 17 | return a > b ? 1 : -1; 18 | }; 19 | } 20 | 21 | var i, l; 22 | 23 | for (i = 0; i < array.length; i++) { 24 | l = i; 25 | while (l-- && compare(array[l], array[l + 1]) > 0) { 26 | swap(array, l, l + 1); 27 | } 28 | } 29 | 30 | return array; 31 | }; 32 | -------------------------------------------------------------------------------- /frontend/javascript/coding/byte-format.js: -------------------------------------------------------------------------------- 1 | var suffixes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; 2 | 3 | module.exports = function (value, precision) { 4 | var factor = Math.pow(10, precision != null ? precision : 2); 5 | 6 | var suffix = Math.min( 7 | ~~(Math.log(value) / Math.log(1024)), suffixes.length - 1 8 | ); 9 | 10 | var num = Math.ceil(value / Math.pow(1024, suffix) * factor) / factor; 11 | 12 | return num + ' ' + suffixes[suffix]; 13 | }; 14 | -------------------------------------------------------------------------------- /frontend/javascript/coding/combine-two-strings.js: -------------------------------------------------------------------------------- 1 | module.exports = function combineTwoStrings (str1, str2, str3) { 2 | // Simple optimisation to break when impossible. 3 | if ((str1.length + str2.length) !== str3.length) { 4 | return false; 5 | } 6 | 7 | return isCombineTwoStrings(str1, str2, str3); 8 | }; 9 | 10 | function isCombineTwoStrings (str1, str2, str3) { 11 | // No more solutions to find. 12 | if (str3.length === 0) { 13 | return true; 14 | } 15 | 16 | var newStr3 = str3.substr(1); 17 | 18 | // Path for when the first string matches. 19 | if (str1[0] === str3[0]) { 20 | // When both paths are possible, we implement a simple backtracking 21 | // mechanism for when the first was wrong. E.g. `aac`, `aab`, `aaacab`. 22 | if (str2[0] === str3[0]) { 23 | return isCombineTwoStrings(str1.substr(1), str2, newStr3) || 24 | isCombineTwoStrings(str1, str2.substr(1), newStr3); 25 | } 26 | 27 | return isCombineTwoStrings(str1.substr(1), str2, newStr3); 28 | } 29 | 30 | // Path for when the second string matches. 31 | if (str2[0] === str3[0]) { 32 | return isCombineTwoStrings(str1, str2.substr(1), newStr3); 33 | } 34 | 35 | // When neither path is possible, the combination is `false`. 36 | return false; 37 | } 38 | -------------------------------------------------------------------------------- /frontend/javascript/coding/convert-array.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function getSwapIndex(currentInd, n) { 4 | var swapInd = (currentInd % 3) * n + parseInt(currentInd/3); 5 | while (swapInd < currentInd) { 6 | swapInd = getSwapIndex(swapInd, n); 7 | } 8 | 9 | return swapInd; 10 | } 11 | 12 | function convert(arr) { 13 | var n = parseInt(arr.length / 3); 14 | 15 | for(var i = 0; i < arr.length; i++) { 16 | var swapInd = getSwapIndex(i, n); 17 | 18 | var tmp = arr[i]; 19 | arr[i] = arr[swapInd]; 20 | arr[swapInd] = tmp; 21 | } 22 | 23 | return arr; 24 | } 25 | 26 | module.exports = convert; 27 | -------------------------------------------------------------------------------- /frontend/javascript/coding/csv-parsing.js: -------------------------------------------------------------------------------- 1 | // Please note: This can be accomplished using `JSON.parse('[' + csv + ']')` 2 | module.exports = function (csv) { 3 | var isNumber = false, 4 | isInput = false, 5 | curr = '', 6 | stack = [], 7 | i = 0, 8 | char, 9 | pushStack; 10 | 11 | csv = csv.trim(); 12 | 13 | pushStack = function (input) { 14 | isNumber && (input = +input); 15 | // Resets 16 | curr = ''; 17 | isInput = false; 18 | isNumber = false; 19 | stack.push(input); 20 | }; 21 | 22 | while (char = csv.charAt(i++)) { 23 | if (char === '"') { 24 | isInput = !curr; 25 | } else if (char === ',') { 26 | if (isInput && !isNumber) { 27 | curr += char; 28 | } else { 29 | pushStack(curr); 30 | } 31 | } else if ((isNumber || !curr) && !Number.isNaN(+char)) { 32 | curr += char; 33 | isInput = true; 34 | isNumber = true; 35 | } else { 36 | if (isNumber || !isInput) { throw new Error('Unexpected character'); } 37 | curr += char; 38 | } 39 | } 40 | 41 | // Push the trailing entry 42 | pushStack(curr); 43 | 44 | return stack; 45 | }; 46 | -------------------------------------------------------------------------------- /frontend/javascript/coding/debounce.js: -------------------------------------------------------------------------------- 1 | module.exports = function (fn, delay, execAsap) { 2 | var timeout; // Keep a reference to the timeout outside the function 3 | 4 | return function () { 5 | // Keep the functions execution context and arguments in tact 6 | var that = this, 7 | args = arguments; 8 | 9 | // If we already have a function ready to execute, clear it 10 | // Else if we are allowed to execute immediately, call the function 11 | if (timeout) { 12 | clearTimeout(timeout); 13 | } else if (execAsap) { 14 | fn.apply(that, args); 15 | } 16 | 17 | timeout = setTimeout(function () { 18 | execAsap || fn.apply(that, args); 19 | timeout = null; 20 | }, delay || 100); 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /frontend/javascript/coding/even-occuring-element.js: -------------------------------------------------------------------------------- 1 | module.exports = function (array) { 2 | var hash = {}; 3 | 4 | // Loop though the array adding all the elements together in a hash 5 | array.forEach(function (num) { 6 | hash[num] = hash[num] + 1 || 1; 7 | }); 8 | 9 | // Loop through all the keys in the hash, returning the number if we have an 10 | // even number of occurances 11 | for (var i in hash) { 12 | if (!(hash[i] & 1)) { 13 | return Number(i); 14 | } 15 | } 16 | 17 | return false; 18 | }; 19 | -------------------------------------------------------------------------------- /frontend/javascript/coding/factorial.js: -------------------------------------------------------------------------------- 1 | // Recursive function example 2 | exports.recursive = function factorial (number) { 3 | if (number < 2) { return 1; } 4 | 5 | return number * factorial(number - 1); 6 | }; 7 | 8 | // Iterative solution 9 | exports.iterative = function (number) { 10 | var result = 1; 11 | 12 | for (var i = 1; i <= number; i++) { 13 | result *= i; 14 | } 15 | 16 | return result; 17 | }; 18 | 19 | // Iterative using a reverse loop 20 | exports.iterativeReverse = function (number) { 21 | var result = 1; 22 | 23 | while (number) { 24 | result *= number; 25 | number -= 1; 26 | } 27 | 28 | return result; 29 | }; 30 | -------------------------------------------------------------------------------- /frontend/javascript/coding/find-missing-element.js: -------------------------------------------------------------------------------- 1 | // Simple solution using a hash to look up numbers from the second array in the 2 | // first array. When the number doesn't exist in the hash - you know we have 3 | // found the missing number 4 | exports.iterative = function (a, b) { 5 | var hash = {}, i; 6 | 7 | for (i = 0; i < b.length; i++) { 8 | hash[b[i]] = hash[b[i]] + 1 || 1; 9 | } 10 | 11 | for (i = 0; i < a.length; i++) { 12 | if (!hash[a[i]]) { 13 | return a[i]; 14 | } 15 | hash[a[i]] -= 1; 16 | } 17 | }; 18 | 19 | // Bitwise solution using XOR to cancel each of the corresponding numbers out 20 | // with eachother until we end up with a number that isn't cancelled out 21 | exports.bitwise = function (a, b) { 22 | var result = 0; 23 | a.concat(b).forEach(function (num) { 24 | result ^= num; 25 | }); 26 | return result; 27 | }; 28 | 29 | // Maybe the simplest solution, but you can very easily add the two arrays and 30 | // take the result of `b` away from `a` to get the missing number 31 | exports.sum = function (a, b) { 32 | var add = function (a, b) { 33 | return a + b; 34 | }; 35 | 36 | return a.reduce(add) - b.reduce(add); 37 | }; 38 | -------------------------------------------------------------------------------- /frontend/javascript/coding/first-non-repeated-character.js: -------------------------------------------------------------------------------- 1 | module.exports = function (string) { 2 | var checkChar, 3 | prevCharacter; 4 | 5 | checkChar = (function () { 6 | var repeated = false; 7 | 8 | return function (char) { 9 | if (prevCharacter && char === prevCharacter) { 10 | repeated = true; 11 | } 12 | if (prevCharacter && char !== prevCharacter) { 13 | if (!repeated) { return true; } 14 | repeated = false; 15 | } 16 | prevCharacter = char; 17 | // Return false to say it's not been repeated 18 | return false; 19 | }; 20 | })(); 21 | 22 | // Interate one extra time past the last character 23 | for (var i = 0; i <= string.length; i++) { 24 | if (checkChar(string[i])) { return prevCharacter; } 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /frontend/javascript/coding/flatten-array.js: -------------------------------------------------------------------------------- 1 | // Create a new flattened array 2 | exports.newArray = function flatten (input) { 3 | var output = []; 4 | 5 | for (var i = 0; i < input.length; i++) { 6 | // Using Array.isArray for new browsers, in older browsers this can be done 7 | // using `Object.prototype.toString.call(input[i]) === '[object Array]'` 8 | if (Array.isArray(input[i])) { 9 | output.push.apply(output, flatten(input[i])); 10 | } else { 11 | output.push(input[i]); 12 | } 13 | } 14 | 15 | return output; 16 | }; 17 | 18 | // In place array flatten 19 | exports.inPlace = function (array) { 20 | var i = 0; 21 | 22 | while (i < array.length) { 23 | if (Array.isArray(array[i])) { 24 | array.splice.apply(array, [i, 1].concat(array[i])); 25 | } else { 26 | i += 1; 27 | } 28 | } 29 | 30 | return array; 31 | }; 32 | 33 | // Flatten array using ES5 reduce method 34 | exports.es5 = function flatten (array) { 35 | return array.reduce(function (arr, val) { 36 | return arr.concat(Array.isArray(val) ? flatten(val) : val); 37 | }, []); 38 | }; 39 | -------------------------------------------------------------------------------- /frontend/javascript/coding/flatten-array/copy.js: -------------------------------------------------------------------------------- 1 | module.exports = function flatten (array) { 2 | var copy = []; 3 | 4 | for (var i = 0; i < array.length; i++) { 5 | if (Array.isArray(array[i])) { 6 | copy.push.apply(copy, flatten(array[i])); 7 | } else { 8 | copy.push(array[i]); 9 | } 10 | } 11 | 12 | return copy; 13 | }; 14 | -------------------------------------------------------------------------------- /frontend/javascript/coding/flatten-array/es5.js: -------------------------------------------------------------------------------- 1 | module.exports = function flatten (array) { 2 | return array.reduce(function (arr, val) { 3 | // Concat is extremely slow which leads to this being the slowest solution. 4 | return arr.concat(Array.isArray(val) ? flatten(val) : val); 5 | }, []); 6 | }; 7 | -------------------------------------------------------------------------------- /frontend/javascript/coding/flatten-array/in-place.js: -------------------------------------------------------------------------------- 1 | module.exports = function (array) { 2 | var i = 0; 3 | 4 | while (i < array.length) { 5 | if (Array.isArray(array[i])) { 6 | array.splice.apply(array, [i, 1].concat(array[i])); 7 | } else { 8 | i += 1; 9 | } 10 | } 11 | 12 | return array; 13 | }; 14 | -------------------------------------------------------------------------------- /frontend/javascript/coding/flatten-array/recursive.js: -------------------------------------------------------------------------------- 1 | var flatten = function (array, result) { 2 | for (var i = 0; i < array.length; i++) { 3 | if (Array.isArray(array[i])) { 4 | flatten(array[i], result); 5 | } else { 6 | result.push(array[i]); 7 | } 8 | } 9 | 10 | return result; 11 | }; 12 | 13 | module.exports = function (array) { 14 | return flatten(array, []); 15 | }; 16 | -------------------------------------------------------------------------------- /frontend/javascript/coding/get-elements-by-class-name.js: -------------------------------------------------------------------------------- 1 | exports.traversal = function (element, className) { 2 | var found = []; 3 | var search = ' ' + className + ' '; 4 | 5 | (function traverse (node) { 6 | // Loop through all the child nodes 7 | for (var i = 0; i < node.childNodes.length; i++) { 8 | var currentNode = node.childNodes[i]; 9 | var currentClass = currentNode.className; 10 | 11 | // Check if the class name exists within the current nodes class 12 | // I believe I learnt of this technique from jQuery source code. 13 | if (currentClass && ~(' ' + currentClass + ' ').indexOf(search)) { 14 | found.push(currentNode); 15 | } 16 | 17 | // If the current node have more child nodes, continue traversing. 18 | currentNode.childNodes && traverse(currentNode); 19 | } 20 | })(element); 21 | 22 | return found; 23 | }; 24 | 25 | exports.regexp = function (element, className) { 26 | // This function takes an easier approach, using a regular expression and 27 | // getting all elements straight up using the asterisk selector. 28 | var found = []; 29 | var regex = new RegExp('(^| )' + className + '($| )'); 30 | var elements = element.getElementsByTagName('*'); 31 | 32 | // Loop through all the elements checking the class names against the 33 | // regular expression - when it suceeds just push it into the output array. 34 | for (var i = 0; i < elements.length; i++) { 35 | if (regex.test(elements[i].className)) { 36 | found.push(elements[i]); 37 | } 38 | } 39 | 40 | return found; 41 | }; 42 | -------------------------------------------------------------------------------- /frontend/javascript/coding/hotel-room.js: -------------------------------------------------------------------------------- 1 | module.exports = function (totalRooms) { 2 | var findDivisors = function (number) { 3 | var divisors = [], 4 | iterator = number; 5 | 6 | while (iterator--) { 7 | if (number % iterator === 0) { 8 | divisors.push(iterator); 9 | } 10 | } 11 | 12 | return divisors; 13 | }; 14 | 15 | // Returns true or false based on whether the number is found in the sum of 16 | // array subsets. 17 | var isSubsetSum = function (number, array) { 18 | var hasSubset = false; 19 | 20 | (function findSubset (total, numbers) { 21 | !hasSubset && (hasSubset = total === number); 22 | 23 | if (hasSubset || total > number) { return; } 24 | 25 | numbers.forEach(function (num, index) { 26 | return findSubset( 27 | total + num, 28 | numbers.slice(0, index).concat(numbers.slice(index + 1)) 29 | ); 30 | }); 31 | })(0, array); 32 | 33 | return hasSubset; 34 | }; 35 | 36 | // Need a simple helper method that returns the sum of an array. 37 | var sumArray = function (array) { 38 | return array.reduce(function (memo, num) { 39 | return memo + num; 40 | }, 0); 41 | }; 42 | 43 | // Find the room using the provided functions. 44 | var divisors; 45 | 46 | for (var room = 0; room <= totalRooms; room++) { 47 | divisors = findDivisors(room); 48 | 49 | // The sum of all the divisors must be greater than the number. 50 | if (sumArray(divisors) > room && !isSubsetSum(room, divisors)) { 51 | return room; 52 | } 53 | } 54 | 55 | return 0; // No room number found. 56 | }; 57 | -------------------------------------------------------------------------------- /frontend/javascript/coding/insertion-sort.js: -------------------------------------------------------------------------------- 1 | // insertion-sort 2 | 'use strict'; 3 | 4 | module.exports = function (array, compare) { 5 | // Not an array, empty or array of 1 is already sorted 6 | if (!Array.isArray(array) || array.length < 2) { 7 | return array; 8 | } 9 | 10 | // Swap elements of the array 11 | var swap = function (array, first, second) { 12 | var temp = array[first]; 13 | array[first] = array[second]; 14 | array[second] = temp; 15 | return array; 16 | }; 17 | 18 | // Create a compare function if one is not passed in 19 | if (typeof compare !== 'function') { 20 | compare = function (a, b) { 21 | return a > b ? 1 : -1; 22 | }; 23 | } 24 | 25 | var i, j; 26 | 27 | /* 28 | * Assume first element is sorted 29 | * Add first unsorted element to sorted array 30 | * Compare new element in sorted array with previous elements 31 | * to determine correct destination index in sorted array 32 | */ 33 | 34 | for (i = 1; i < array.length; i++) { 35 | j = i; 36 | // Make sure we don't walk off the array and compare until sorted 37 | while ((j - 1) >= 0 && compare(array[j], array[j - 1]) < 0) { 38 | swap(array, j, j-1); 39 | j--; 40 | } 41 | } 42 | 43 | return array; 44 | }; 45 | -------------------------------------------------------------------------------- /frontend/javascript/coding/integer-difference.js: -------------------------------------------------------------------------------- 1 | module.exports = function (n, array) { 2 | var hash = {}, 3 | total = 0; 4 | 5 | // Loop through the array once, storing the results in an object for a 6 | // time complexity of O(n) - the naive solution consists of two for loops 7 | // which results in a complexity of O(n^2) 8 | array.forEach(function (number) { 9 | hash[number] = (hash[number] || 0) + 1; 10 | total += (hash[number - n] || 0) + (hash[number + n] || 0); 11 | }); 12 | 13 | return total; 14 | }; 15 | -------------------------------------------------------------------------------- /frontend/javascript/coding/integer-length.js: -------------------------------------------------------------------------------- 1 | module.exports = function (num) { 2 | // There is an extra check here to ensure the number is an integer 3 | return ('' + (num|0)).length; 4 | }; 5 | -------------------------------------------------------------------------------- /frontend/javascript/coding/kth-largest-element-in-array.js: -------------------------------------------------------------------------------- 1 | module.exports = function (k, array) { 2 | // I believe we can store it in a hash to achieve an O(n) complexity 3 | var hash = {}, 4 | count = 0; 5 | 6 | // Loop through each of the array items putting the values as keys in the hash 7 | array.forEach(function (num) { 8 | hash[num] = hash[num] + 1 || 1; 9 | }); 10 | 11 | // Loop through each of the keys in the hash and keep track of the total count 12 | for (var i in hash) { 13 | if (hash.hasOwnProperty(i)) { 14 | // Check if `k` is smaller or equal to the current count plus the current 15 | // hash index, but also greater than the previous count (this will mean it 16 | // is stored in this integer key) 17 | if (k <= count + hash[i] && k > count) { 18 | // Coerce the output back to a number, since that is expected 19 | return +i; 20 | } 21 | // Increment the total count 22 | count += hash[i]; 23 | } 24 | } 25 | 26 | return -1; 27 | }; 28 | -------------------------------------------------------------------------------- /frontend/javascript/coding/largest-continuous-sum.js: -------------------------------------------------------------------------------- 1 | module.exports = function (array) { 2 | if (!array || !array.length) { return; } 3 | 4 | var currentSum, maximumSum; 5 | 6 | // Set the starting sum as the first number 7 | currentSum = maximumSum = array.shift(); 8 | 9 | array.forEach(function (num) { 10 | currentSum = Math.max(currentSum + num, num); 11 | maximumSum = Math.max(currentSum, maximumSum); 12 | }); 13 | 14 | return maximumSum; 15 | }; 16 | -------------------------------------------------------------------------------- /frontend/javascript/coding/largest-palindrome.js: -------------------------------------------------------------------------------- 1 | function isPalindrome (str) { 2 | const mid = Math.floor(str.length / 2) 3 | 4 | for (let i = 0; i < mid; i++) { 5 | if (str[i] !== str[str.length - 1 - i]) { 6 | return false 7 | } 8 | } 9 | 10 | return true 11 | } 12 | 13 | module.exports = function longestPalindrome (str) { 14 | let longest = '' 15 | 16 | for (let i = 0; i < str.length; i++) { 17 | let len = str.length 18 | 19 | while (len > i && len - i > longest.length) { 20 | const substring = str.substring(i, len--) 21 | 22 | if (isPalindrome(substring)) { 23 | longest = substring 24 | } 25 | } 26 | } 27 | 28 | return longest 29 | } 30 | -------------------------------------------------------------------------------- /frontend/javascript/coding/linked-list.js: -------------------------------------------------------------------------------- 1 | var LinkedList = module.exports = function (value) { 2 | this.value = value; 3 | this.prev = this; 4 | this.next = this; 5 | }; 6 | 7 | LinkedList.prototype.appendNode = function (value) { 8 | var node = new LinkedList(value); 9 | node.prev = this; 10 | node.next = this.next; 11 | // Fix the linked list references 12 | this.next = this.next.prev = node; 13 | return node; 14 | }; 15 | 16 | LinkedList.prototype.prependNode = function (value) { 17 | var node = new LinkedList(value); 18 | node.prev = this.prev; 19 | node.next = this; 20 | // Fix the linked list references 21 | this.prev = this.prev.next = node; 22 | return node; 23 | }; 24 | 25 | LinkedList.prototype.removeNode = function () { 26 | // Create a reference around the node to be removed 27 | this.prev.next = this.next; 28 | this.next.prev = this.prev; 29 | // Remove existing references to the current list 30 | this.next = this.prev = this; 31 | return this; 32 | }; 33 | 34 | LinkedList.prototype.containsNode = function (value) { 35 | if (this.value === value) { return true; } 36 | 37 | var node = this.next; 38 | // Loop through the connections until we hit ourselves again 39 | while (node !== this) { 40 | if (node.value === value) { 41 | return true; 42 | } 43 | node = node.next; 44 | } 45 | 46 | return false; 47 | }; 48 | -------------------------------------------------------------------------------- /frontend/javascript/coding/longest-words.js: -------------------------------------------------------------------------------- 1 | module.exports = function (string) { 2 | var length = 0; 3 | // Store the list of longest words in an object to automatically filter 4 | // for duplicates. 5 | var hash = {}; 6 | 7 | // Simplistic splitting on spaces, could improve to trim punctuation as well. 8 | string.split(' ').forEach(function (word) { 9 | // If the word's length is longer than the previous longest, we want to 10 | // update the length and reset the hash back to be empty. 11 | if (word.length > length) { 12 | length = word.length; 13 | hash = {}; 14 | } 15 | 16 | // If the word length is the same as the current longest length, add the 17 | // lowercase version to the hash. Here, we could store the value as some 18 | // arbitrary value since it doesn't matter - if though we needed to return 19 | // the instance of the word we could store how we found the word as the 20 | // value and grab it out when we return. 21 | if (word.length === length) { 22 | return hash[word.toLowerCase()] = true; 23 | } 24 | }); 25 | 26 | // Return an array with all the words. 27 | return Object.keys(hash); 28 | }; 29 | -------------------------------------------------------------------------------- /frontend/javascript/coding/matching-nodes.js: -------------------------------------------------------------------------------- 1 | /* global isMatchingNode */ 2 | 3 | // Make the function accept the node from the first tree and the second tree 4 | // where we need to find the matching node 5 | module.exports = function (node, tree) { 6 | // Easiest way to optimize this is to store the path from the node to the root 7 | // and then we can traverse back down the second tree following the same path 8 | var path = [node], 9 | // Use the child variable to find the matching node in the second tree 10 | child = tree; 11 | 12 | // Loop through all the parent nodes, pushing it into the stack as the pathway 13 | while (node = node.parentNode) { 14 | path.push(node); 15 | } 16 | 17 | // Pop the last thing we pushed onto the path since it'll be the root node 18 | // E.g. It'll be the tree that we are passing in anyway 19 | path.pop(); 20 | 21 | // Once the loop is done, we have the root node and can go back down the tree 22 | while (node = path.pop()) { 23 | for (var i = 0; i < child.childNodes.length; i++) { 24 | // Here we assume we have a function called `isMatchingNode` that returns 25 | // us a boolean in the case of two nodes matching each other 26 | if (isMatchingNode(node, child.childNodes[i])) { 27 | child = child.childNodes[i]; 28 | break; // Break looping over more nodes 29 | } 30 | } 31 | } 32 | 33 | return child; 34 | }; 35 | -------------------------------------------------------------------------------- /frontend/javascript/coding/merge-sort.js: -------------------------------------------------------------------------------- 1 | // Sort the array by breaking it down into smaller chunks 2 | module.exports = function mergeSort (array, compare) { 3 | // If's not an array or an array of just one element, it's already sorted 4 | if (!Array.isArray(array) || array.length < 2) { return array; } 5 | 6 | var length = array.length, 7 | middle = Math.floor(length * 0.5), 8 | left = array.slice(0, middle), 9 | right = array.slice(middle, length); 10 | 11 | // Create a compare func if not passed in 12 | if (typeof compare !== 'function') { 13 | compare = function (a, b) { 14 | return a > b ? 1 : -1; 15 | }; 16 | } 17 | 18 | var merge = function (left, right) { 19 | var result = []; 20 | while (left.length || right.length) { 21 | if (left.length && right.length) { 22 | if (compare(left[0], right[0]) < 1) { 23 | result.push(left.shift()); 24 | } else { 25 | result.push(right.shift()); 26 | } 27 | } else if (left.length) { 28 | result.push(left.shift()); 29 | } else { 30 | result.push(right.shift()); 31 | } 32 | } 33 | return result; 34 | }; 35 | 36 | return merge(mergeSort(left), mergeSort(right)); 37 | }; 38 | -------------------------------------------------------------------------------- /frontend/javascript/coding/missing-number.js: -------------------------------------------------------------------------------- 1 | var add = function (a, b) { 2 | return a + b; 3 | }; 4 | 5 | module.exports = function (array) { 6 | // http://en.wikipedia.org/wiki/Arithmetic_progression#Sum 7 | // Add one to the array length since we are missing a single number, use 1 8 | // as the starting value and the length of the array + 1 as the ending value. 9 | // Then just minus the result of adding all the values together to get our 10 | // missing number. 11 | return ((array.length + 1) * (2 + array.length) / 2) - array.reduce(add, 0); 12 | }; 13 | -------------------------------------------------------------------------------- /frontend/javascript/coding/money-format.js: -------------------------------------------------------------------------------- 1 | module.exports = function (value) { 2 | var remaining = value - ~~value, 3 | string = '' + ~~value, 4 | length = string.length, 5 | places = 0; 6 | 7 | while (--length) { 8 | places += 1; 9 | // At every third position we want to insert a comma 10 | if (places % 3 === 0) { 11 | string = string.substr(0, length) + ',' + string.substr(length); 12 | } 13 | } 14 | 15 | return '$' + string + remaining.toFixed(2).slice(1); 16 | }; 17 | -------------------------------------------------------------------------------- /frontend/javascript/coding/multiples-of-3-and-5.js: -------------------------------------------------------------------------------- 1 | // Accepts a number and an array of multiples 2 | module.exports = function sumOfMultiples (number, multiples) { 3 | return Array.apply(null, new Array(number)).map(function (_, index) { 4 | return index; 5 | }).filter(function (number) { 6 | return multiples.some(function (multiple) { 7 | return number % multiple === 0; 8 | }); 9 | }).reduce(function (memo, number) { 10 | return memo + number; 11 | }); 12 | }; 13 | -------------------------------------------------------------------------------- /frontend/javascript/coding/next-highest-number.js: -------------------------------------------------------------------------------- 1 | module.exports = function (number) { 2 | var numberString = ('' + number); 3 | var length = numberString.length - 1; 4 | var string = ''; 5 | var sorter; 6 | 7 | // Loop in reverse comparing all the digits to the one beside it. 8 | while (length--) { 9 | // Compare the numbers beside each other. 10 | if (numberString.charAt(length) < numberString.charAt(length + 1)) { 11 | // Start the string using the numbers up until the pivot point. 12 | string = numberString.substr(0, length); 13 | // Sort all the numbers after the pivot. 14 | sorter = numberString.substr(length).split('').sort(); 15 | 16 | // Loop through all the numbers and if the next largest number than the 17 | // pivot. 18 | for (var i = 0; i < sorter.length; i++) { 19 | if (sorter[i] > numberString.charAt(length)) { 20 | // Splice the number from it's position and append it to the current 21 | // string. 22 | string += sorter.splice(i, 1)[0]; 23 | break; 24 | } 25 | } 26 | 27 | // Append the rest of the numbers already in ascending order. 28 | string += sorter.join(''); 29 | // Return the string typecast back to a number. 30 | return +string; 31 | } 32 | } 33 | 34 | return number; 35 | }; 36 | -------------------------------------------------------------------------------- /frontend/javascript/coding/next-palindrome-number.js: -------------------------------------------------------------------------------- 1 | module.exports = function nextPalindrome (number) { 2 | var numberString = ('' + number), 3 | numberLength = numberString.length, 4 | oddDigits = numberLength & 1, 5 | leftHalf = numberString.substr(0, ~~(numberLength / 2)), 6 | middleNumber = numberString.charAt(Math.ceil(numberLength / 2)), 7 | increment, newNumber, reverseString; 8 | 9 | reverseString = function (string) { 10 | return string.length > 1 ? string.split('').reverse().join('') : string; 11 | }; 12 | 13 | if (oddDigits) { 14 | increment = Math.pow(10, numberLength / 2); 15 | newNumber = +(leftHalf + middleNumber + reverseString(leftHalf)); 16 | } else { 17 | increment = 1.1 * Math.pow(10, numberLength / 2); 18 | newNumber = +(leftHalf + reverseString(leftHalf)); 19 | } 20 | 21 | if (newNumber > number) { 22 | return newNumber; 23 | } 24 | 25 | if (middleNumber === '9') { 26 | return nextPalindrome(+numberString[0] * Math.pow(10, numberLength)); 27 | } else { 28 | return newNumber + increment; 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /frontend/javascript/coding/number-format.js: -------------------------------------------------------------------------------- 1 | exports.iterative = function (number) { 2 | var string = ('' + number).split('.'), 3 | length = string[0].length, 4 | places = 0; 5 | 6 | while (--length) { 7 | places += 1; 8 | // At every third position we want to insert a comma 9 | if (places % 3 === 0) { 10 | string[0] = string[0].substr(0, length) + ',' + string[0].substr(length); 11 | } 12 | } 13 | 14 | return string.join('.'); 15 | }; 16 | 17 | exports.regexp = function (number) { 18 | var string = ('' + number).split('.'); 19 | 20 | string[0] = string[0].replace(/(\d)(?=(?:\d{3})+(?:\.|$))/g, '$1,'); 21 | 22 | return string.join('.'); 23 | }; 24 | -------------------------------------------------------------------------------- /frontend/javascript/coding/odd-occuring-element.js: -------------------------------------------------------------------------------- 1 | module.exports = function (array) { 2 | return array.reduce(function (memo, number) { 3 | return memo ^ number; 4 | }, 0); 5 | }; 6 | -------------------------------------------------------------------------------- /frontend/javascript/coding/once.js: -------------------------------------------------------------------------------- 1 | module.exports = function (fn, times) { 2 | // Set times to one if nothing is passed through and keep track of the 3 | // latest return value to return when we run out of execution times. 4 | var memo; 5 | times = times || 1; 6 | 7 | // Return the function that will be executed. 8 | return function () { 9 | if (!times) { return memo; } 10 | 11 | // Set memo to the result of the function and decrement the number of 12 | // executions. 13 | memo = fn.apply(this, arguments); 14 | times -= 1; 15 | 16 | // If there are no more execution times, set the function to `null` so 17 | // it can be garbage collected and return the memo. 18 | times || (fn = null); 19 | return memo; 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /frontend/javascript/coding/prime-number.js: -------------------------------------------------------------------------------- 1 | module.exports = function (n) { 2 | if (n === 2) { return true; } 3 | if (n < 2 || !(n&1)) { return false; } 4 | 5 | for (var i = 3, l = Math.floor(Math.pow(n, 0.5)); i <= l; i += 2) { 6 | if (n % i === 0) { 7 | return false; 8 | } 9 | } 10 | 11 | return true; 12 | }; 13 | -------------------------------------------------------------------------------- /frontend/javascript/coding/queen-threatens-king.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if two points (p1 and p2) defined by the coordinates 3 | * passed as arguments are either horizontally, vertically or 4 | * diagonally (45°) aligned with one another. 5 | * 6 | * @param {Number} x1 x-coordinate of p1 7 | * @param {Number} y1 y-coordinate of p1 8 | * @param {Number} x2 x-coordinate of p2 9 | * @param {Number} y2 y-coordinate of p2 10 | * @return {Boolean} True if the points are aligned (horz / vert / diag) 11 | */ 12 | module.exports = function (x1, y1, x2, y2) { 13 | 14 | // Validate coordinate values 15 | var validArgs = Array.prototype.slice.call(arguments).every(function (coord) { 16 | return typeof coord === 'number'; 17 | }); 18 | 19 | if (!validArgs) { 20 | throw new Error('All coordinates must numbers'); 21 | } 22 | 23 | return x1 === x2 || y1 === y2 || Math.abs(x1 - x2) === Math.abs(y1 - y2); 24 | 25 | }; 26 | -------------------------------------------------------------------------------- /frontend/javascript/coding/queen-threatens-king/queen-threatens-king-solution-diagonal-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/coding/queen-threatens-king/queen-threatens-king-solution-diagonal-1.png -------------------------------------------------------------------------------- /frontend/javascript/coding/queen-threatens-king/queen-threatens-king-solution-diagonal-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/coding/queen-threatens-king/queen-threatens-king-solution-diagonal-2.png -------------------------------------------------------------------------------- /frontend/javascript/coding/queen-threatens-king/queen-threatens-king-solution-horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/coding/queen-threatens-king/queen-threatens-king-solution-horizontal.png -------------------------------------------------------------------------------- /frontend/javascript/coding/queen-threatens-king/queen-threatens-king-solution-vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/javascript/coding/queen-threatens-king/queen-threatens-king-solution-vertical.png -------------------------------------------------------------------------------- /frontend/javascript/coding/queen-threatens-king/readme.md: -------------------------------------------------------------------------------- 1 | Visualizing the different ways the Queen and the King can be located relative to each other should help solve the problem. As the Queen can only move horizontally, vertically or diagonally (45°) it should be easy to deduce that the King is always threatened by the Queen if they are located in the same row (horizontally aligned) or column (vertically aligned): 2 | 3 | ![The Queen and the King are in the same row](queen-threatens-king-solution-horizontal.png) 4 | ![The Queen and the King are in the same column](queen-threatens-king-solution-vertical.png) 5 | 6 | The somewhat less trivial case is to check if the Queen and the King are in the same diagonal. The problem can be however greatly simplified by only focusing on the part of the board that is covered by the rectangle given by the Queen's and the King's coordinates: 7 | 8 | ![The Queen and the King define a rectangle](queen-threatens-king-solution-diagonal-1.png) 9 | 10 | From here it should become obvious that the Queen and the King will be located on the same diagonal only if the rectangle they form is a square, i.e. Δx == Δy: 11 | 12 | ![The Queen and the King define a rectangle](queen-threatens-king-solution-diagonal-2.png) 13 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/javascript/coding/queue.js: -------------------------------------------------------------------------------- 1 | var Queue = module.exports = function () { 2 | this.head = null; 3 | this.tail = null; 4 | this.length = 0; 5 | }; 6 | 7 | Queue.prototype.enqueue = function (value) { 8 | var node = { 9 | value: value, 10 | next: null 11 | }; 12 | 13 | // If there is currently no head node, set it to the current node. 14 | if (!this.head) { 15 | this.head = node; 16 | } 17 | 18 | // If we have a tail node already, set it's next property to be the current 19 | // node. 20 | if (this.tail) { 21 | this.tail.next = node; 22 | } 23 | 24 | // Update the tail to be the next node. 25 | this.tail = node; 26 | 27 | return this.length += 1; 28 | }; 29 | 30 | Queue.prototype.dequeue = function () { 31 | if (!this.head) { return; } 32 | 33 | var node = this.head; 34 | 35 | // Update the head reference and remove the next node reference from the 36 | // previous head. 37 | this.head = node.next; 38 | node.next = null; 39 | 40 | // Remove the tail node if we have no more head node. 41 | if (!this.head) { this.tail = null; } 42 | 43 | this.length -= 1; 44 | 45 | return node.value; 46 | }; 47 | -------------------------------------------------------------------------------- /frontend/javascript/coding/quick-sort.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function quickSort(input, compare) { 4 | var lesser = [], 5 | greater = [], 6 | pivot; 7 | 8 | if (!Array.isArray(input)) { 9 | throw new Error('Can only sort arrays.'); 10 | } 11 | 12 | var array = input.slice(0); // make a copy of the array 13 | 14 | if (array.length < 2) { 15 | return array; 16 | } 17 | 18 | // Create a compare func if not passed in 19 | if (typeof compare !== 'function') { 20 | compare = function (a, b) { 21 | return a > b ? 1 : -1; 22 | }; 23 | } 24 | 25 | // Get our pivot, this can be random 26 | pivot = array.splice(~~(Math.random() * array.length), 1); 27 | 28 | // Iterate and put vals into either lesser or greater lists compared 29 | // to the pivot 30 | for (var i = 0; i < array.length; i++) { 31 | if (compare(array[i], pivot) < 1) { 32 | lesser.push(array[i]); 33 | } else { 34 | greater.push(array[i]); 35 | } 36 | } 37 | 38 | // Sort lesser and greater lists, concat results 39 | return Array.prototype.concat( 40 | quickSort(lesser, compare), 41 | pivot, 42 | quickSort(greater, compare) 43 | ); 44 | }; 45 | -------------------------------------------------------------------------------- /frontend/javascript/coding/remove-duplicates-from-string.js: -------------------------------------------------------------------------------- 1 | module.exports = function (string) { 2 | var output = '', 3 | hash = {}; 4 | 5 | for (var i = 0; i < string.length; i++) { 6 | if (!hash[string[i]]) { 7 | output += string[i]; 8 | } 9 | hash[string[i]] = true; 10 | } 11 | 12 | return output; 13 | }; 14 | -------------------------------------------------------------------------------- /frontend/javascript/coding/reverse-words-in-string.js: -------------------------------------------------------------------------------- 1 | module.exports = function (string) { 2 | return string.split(/\s+/g).reverse().join(' '); 3 | }; 4 | -------------------------------------------------------------------------------- /frontend/javascript/coding/search-unknown-length-array.js: -------------------------------------------------------------------------------- 1 | module.exports = function searchArray (array, num) { 2 | var index = 0; 3 | 4 | // Increment the index by doubling until we pass the search number. 5 | while (index in array && array[index] <= num) { 6 | if (array[index] === num) { 7 | return index; 8 | } 9 | 10 | // Double the index at which we are seaching. 11 | index = (index * 2) || 1; 12 | } 13 | 14 | // If the index hasn't been incremented beyond the first index, it won't be 15 | // found. 16 | if (index < 2) { return -1; } 17 | 18 | // Track the found index so we can continue to return `-1` down the stack. 19 | var foundIndex = searchArray(array.slice(index / 2, index), num); 20 | 21 | // Return `-1` or old index plus new found index. 22 | return foundIndex > -1 ? (index / 2) + foundIndex : -1; 23 | }; 24 | -------------------------------------------------------------------------------- /frontend/javascript/coding/selection-sort.js: -------------------------------------------------------------------------------- 1 | module.exports = function (array, compare) { 2 | // Not an array, empty or array of 1 is already sorted 3 | if (!Array.isArray(array) || array.length < 2) { 4 | return array; 5 | } 6 | 7 | var swap = function (array, first, second) { 8 | var temp = array[first]; 9 | array[first] = array[second]; 10 | array[second] = temp; 11 | return array; 12 | }; 13 | 14 | // Create a compare func if not passed in 15 | if (typeof compare !== 'function') { 16 | compare = function (a, b) { 17 | return a > b ? 1 : -1; 18 | }; 19 | } 20 | 21 | var min, i, j; 22 | 23 | for (i = 0; i < array.length; i++) { 24 | min = i; 25 | for (j = i + 1; j < array.length; j++) { 26 | if (compare(array[j], array[min]) < 0) { 27 | min = j; 28 | } 29 | } 30 | 31 | swap(array, i, min); 32 | } 33 | 34 | return array; 35 | }; 36 | -------------------------------------------------------------------------------- /frontend/javascript/coding/shortest-fizz-buzz.js: -------------------------------------------------------------------------------- 1 | for(i=0;++i<101;)console.log((i%3?'':'Fizz')+(i%5?'':'Buzz')||i) 2 | -------------------------------------------------------------------------------- /frontend/javascript/coding/sorted-array-search.js: -------------------------------------------------------------------------------- 1 | module.exports = function (array, number) { 2 | return (function searchNumber (left, right) { 3 | var center = left + Math.floor((right - left) / 2); 4 | 5 | // If the numbers match, return the center index. 6 | if (array[center] === number) { return center; } 7 | 8 | // If the left position is the same as the center position, return -1. 9 | if (left === center) { return -1; } 10 | 11 | // When the current number is larger than the search input, recurse 12 | // moving the left and right indexes to the search area. 13 | if (array[center] > number) { 14 | return searchNumber(left, center); 15 | } 16 | 17 | // When the current number is smaller move the search parameters to the 18 | // right. 19 | if (array[center] < number) { 20 | return searchNumber(center, right); 21 | } 22 | 23 | return -1; 24 | })(0, array.length); 25 | }; 26 | -------------------------------------------------------------------------------- /frontend/javascript/coding/stack.js: -------------------------------------------------------------------------------- 1 | var Stack = module.exports = function () { 2 | this.head = null; 3 | this.length = 0; 4 | }; 5 | 6 | Stack.prototype.push = function (value) { 7 | var node = { 8 | value: value, 9 | next: null 10 | }; 11 | 12 | if (!this.head) { 13 | this.head = node; 14 | } else { 15 | node.next = this.head; 16 | this.head = node; 17 | } 18 | 19 | return this.length += 1; 20 | }; 21 | 22 | Stack.prototype.pop = function () { 23 | // If there is no head node, return `undefined` 24 | if (!this.head) { return; } 25 | 26 | var node = this.head; 27 | 28 | // Update the head reference and remove the next node reference from the 29 | // previous head. 30 | this.head = node.next; 31 | node.next = null; 32 | 33 | this.length -= 1; 34 | 35 | return node.value; 36 | }; 37 | -------------------------------------------------------------------------------- /frontend/javascript/coding/string-format.js: -------------------------------------------------------------------------------- 1 | module.exports = function (string /* , args */) { 2 | var args = Array.prototype.slice.call(arguments, 1); 3 | 4 | return string.replace(/\{(\d+)\}/g, function (_, arg) { 5 | return arg in args ? args[arg] : _; 6 | }); 7 | }; 8 | -------------------------------------------------------------------------------- /frontend/javascript/coding/string-permutations.js: -------------------------------------------------------------------------------- 1 | module.exports = function (string) { 2 | var result = {}; 3 | 4 | // Using an immediately invoked named function for recursion. 5 | (function makeWord (word, remaining) { 6 | // If there are no more remaining characters, break and set to true 7 | // in the result object. 8 | if (!remaining) { return result[word] = true; } 9 | 10 | // Loop through all the remaining letters and recurse slicing the character 11 | // out of the remaining stack and into the solution word. 12 | for (var i = 0; i < remaining.length; i++) { 13 | makeWord( 14 | word + remaining[i], 15 | remaining.substr(0, i) + remaining.substr(i + 1) 16 | ); 17 | } 18 | })('', string); 19 | 20 | // Using the ES5 Object.keys to grab the all the keys as an array. 21 | return Object.keys(result); 22 | }; 23 | -------------------------------------------------------------------------------- /frontend/javascript/coding/string-rotation.js: -------------------------------------------------------------------------------- 1 | module.exports = function (a, b) { 2 | return a.length === b.length && (a + a).indexOf(b) > -1; 3 | }; 4 | -------------------------------------------------------------------------------- /frontend/javascript/coding/sum-of-array-plus-one.js: -------------------------------------------------------------------------------- 1 | // ES5 method is nice and clean 2 | exports.es5 = function (array) { 3 | return array.reduce(function (memo, num) { 4 | return memo + num; 5 | }, array.length); 6 | }; 7 | 8 | // Without array.reduce method isn't much different 9 | exports.iterative = function (array) { 10 | var result = array.length; 11 | 12 | for (var i = 0; i < array.length; i++) { 13 | result += array[i]; 14 | } 15 | 16 | return result; 17 | }; 18 | -------------------------------------------------------------------------------- /frontend/javascript/coding/throttle.js: -------------------------------------------------------------------------------- 1 | module.exports = function (fn, delay, execAsap) { 2 | var timeout; // Keeps a reference to the timeout inside the returned function 3 | 4 | return function () { 5 | // Continue to pass through the function execution context and arguments 6 | var that = this, 7 | args = arguments; 8 | 9 | // If there is no timeout variable set, proceed to create a new timeout 10 | if (!timeout) { 11 | execAsap && fn.apply(that, args); 12 | 13 | timeout = setTimeout(function () { 14 | execAsap || fn.apply(that, args); 15 | // Remove the old timeout variable so the function can run again 16 | timeout = null; 17 | }, delay || 100); 18 | } 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /frontend/javascript/coding/tree-level-order-print.js: -------------------------------------------------------------------------------- 1 | module.exports = function (root) { 2 | // Doing a breadth first search using recursion. 3 | (function walkLevel (children) { 4 | // Create a new queue for the next level. 5 | var queue = [], 6 | output; 7 | 8 | // Use the map function to easily join all the nodes together while pushing 9 | // it's children into the next level queue. 10 | output = children.map(function (node) { 11 | // Assuming the node has children stored in an array. 12 | queue = queue.concat(node.children || []); 13 | return node.value; 14 | }).join(' '); 15 | 16 | // Log the output at each level. 17 | console.log(output); 18 | 19 | // If the queue has values in it, recurse to the next level and walk 20 | // along it. 21 | queue.length && walkLevel(queue); 22 | })([root]); 23 | }; 24 | -------------------------------------------------------------------------------- /frontend/javascript/coding/word-positions.js: -------------------------------------------------------------------------------- 1 | module.exports = function (text) { 2 | var trie = {}, 3 | pos = 0, 4 | active = trie; // Start the active structure as the root trie structure 5 | 6 | // Suffix a space after the text to make life easier 7 | text += ' '; 8 | 9 | // Loop through the input text adding it to the trie structure 10 | for (var i = 0; i < text.length; i++) { 11 | // When the character is a space, restart 12 | if (text[i] === ' ') { 13 | // If the current active doesn't equal the root, set the position 14 | if (active !== trie) { 15 | (active.positions = active.positions || []).push(pos); 16 | } 17 | // Reset the positions and the active part of the data structure 18 | pos = i; 19 | active = trie; 20 | continue; 21 | } 22 | 23 | // Set the next character in the structure up 24 | active[text[i]] = (active[text[i]] || {}); 25 | active = active[text[i]]; 26 | } 27 | 28 | // Return a function that accepts a word and looks it up in the trie structure 29 | return function (word) { 30 | var i = -1, 31 | active = trie; 32 | 33 | while (word[++i]) { 34 | if (!active[word[i]]) { return []; } 35 | active = active[word[i]]; 36 | } 37 | 38 | return active.positions; 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /frontend/react/assets/Higher_Order_Components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/Higher_Order_Components.png -------------------------------------------------------------------------------- /frontend/react/assets/How_to_pass_data_between_react_components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/How_to_pass_data_between_react_components.png -------------------------------------------------------------------------------- /frontend/react/assets/How_to_pass_data_between_sibling_components_using_React_router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/How_to_pass_data_between_sibling_components_using_React_router.png -------------------------------------------------------------------------------- /frontend/react/assets/What_are_keys_in_React.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/What_are_keys_in_React.png -------------------------------------------------------------------------------- /frontend/react/assets/What_is_prop_drilling_in_React.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/What_is_prop_drilling_in_React.png -------------------------------------------------------------------------------- /frontend/react/assets/different_phases_of_the_component_lifecycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/different_phases_of_the_component_lifecycle.png -------------------------------------------------------------------------------- /frontend/react/assets/react.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/react.png -------------------------------------------------------------------------------- /frontend/react/assets/types_of_Hooks_in_React.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/types_of_Hooks_in_React.png -------------------------------------------------------------------------------- /frontend/react/assets/virtual_DOM-how_does_it_work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/virtual_DOM-how_does_it_work.png -------------------------------------------------------------------------------- /frontend/react/assets/virtual_DOM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/react/assets/virtual_DOM.png -------------------------------------------------------------------------------- /frontend/typescript/assets/Typescript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/typescript/assets/Typescript.png -------------------------------------------------------------------------------- /frontend/typescript/assets/Typescript_Artboard_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/typescript/assets/Typescript_Artboard_3.png -------------------------------------------------------------------------------- /frontend/typescript/assets/Typescript_Compilation_Process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/typescript/assets/Typescript_Compilation_Process.png -------------------------------------------------------------------------------- /frontend/typescript/assets/Typescript_Types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/typescript/assets/Typescript_Types.png -------------------------------------------------------------------------------- /frontend/typescript/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/typescript/assets/logo.png -------------------------------------------------------------------------------- /frontend/web-api/assets/API_Application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/web-api/assets/API_Application.png -------------------------------------------------------------------------------- /frontend/web-api/assets/MVC_vs_Web_API.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/web-api/assets/MVC_vs_Web_API.png -------------------------------------------------------------------------------- /frontend/web-api/assets/WEB_API.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/web-api/assets/WEB_API.png -------------------------------------------------------------------------------- /frontend/web-api/assets/Web_api_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/web-api/assets/Web_api_filter.png -------------------------------------------------------------------------------- /frontend/web-api/assets/cors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/web-api/assets/cors.png -------------------------------------------------------------------------------- /frontend/web-api/assets/mediaformatter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/web-api/assets/mediaformatter.png -------------------------------------------------------------------------------- /frontend/web-api/assets/web-api.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/frontend/web-api/assets/web-api.jpg -------------------------------------------------------------------------------- /interviews.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/interviews.jpg -------------------------------------------------------------------------------- /mobile/android/assets/Android_Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/android/assets/Android_Architecture.png -------------------------------------------------------------------------------- /mobile/android/assets/Life_Cycle_of_Android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/android/assets/Life_Cycle_of_Android.png -------------------------------------------------------------------------------- /mobile/android/assets/Types_Of_Context.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/android/assets/Types_Of_Context.png -------------------------------------------------------------------------------- /mobile/android/assets/Types_Of_Intents.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/android/assets/Types_Of_Intents.jpg -------------------------------------------------------------------------------- /mobile/android/assets/adapter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/android/assets/adapter.png -------------------------------------------------------------------------------- /mobile/android/assets/android.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/android/assets/android.jpg -------------------------------------------------------------------------------- /mobile/ios/assets/Architecture_of_iOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/Architecture_of_iOS.png -------------------------------------------------------------------------------- /mobile/ios/assets/Facade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/Facade.png -------------------------------------------------------------------------------- /mobile/ios/assets/MVC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/MVC.png -------------------------------------------------------------------------------- /mobile/ios/assets/MVVM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/MVVM.png -------------------------------------------------------------------------------- /mobile/ios/assets/Objective-C_in_OS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/Objective-C_in_OS.png -------------------------------------------------------------------------------- /mobile/ios/assets/Swift_in_iOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/Swift_in_iOS.png -------------------------------------------------------------------------------- /mobile/ios/assets/TDD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/TDD.png -------------------------------------------------------------------------------- /mobile/ios/assets/deep_linking_in_iOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/deep_linking_in_iOS.png -------------------------------------------------------------------------------- /mobile/ios/assets/iBeacons_in_iOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/iBeacons_in_iOS.png -------------------------------------------------------------------------------- /mobile/ios/assets/ios.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/ios.jpg -------------------------------------------------------------------------------- /mobile/ios/assets/ios_application_states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/ios_application_states.png -------------------------------------------------------------------------------- /mobile/ios/assets/synchronous_and_asynchronous_tasks_in_iOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/ios/assets/synchronous_and_asynchronous_tasks_in_iOS.png -------------------------------------------------------------------------------- /mobile/java/assets/JIT_Compiler.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/JIT_Compiler.jpg -------------------------------------------------------------------------------- /mobile/java/assets/constructor_chaining_in_Java.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/constructor_chaining_in_Java.jpg -------------------------------------------------------------------------------- /mobile/java/assets/constructor_overloading_java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/constructor_overloading_java.png -------------------------------------------------------------------------------- /mobile/java/assets/data_encapsulation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/data_encapsulation.jpg -------------------------------------------------------------------------------- /mobile/java/assets/exception.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/exception.png -------------------------------------------------------------------------------- /mobile/java/assets/instance_vs_local_variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/instance_vs_local_variable.png -------------------------------------------------------------------------------- /mobile/java/assets/java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/java.png -------------------------------------------------------------------------------- /mobile/java/assets/java_stack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/java_stack.jpg -------------------------------------------------------------------------------- /mobile/java/assets/java_thread_lifecycle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/java_thread_lifecycle.jpg -------------------------------------------------------------------------------- /mobile/java/assets/jdk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/jdk.jpg -------------------------------------------------------------------------------- /mobile/java/assets/method_overloading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/method_overloading.png -------------------------------------------------------------------------------- /mobile/java/assets/method_overriding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/method_overriding.png -------------------------------------------------------------------------------- /mobile/java/assets/sorting_of_objects_in_arraylist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/sorting_of_objects_in_arraylist.png -------------------------------------------------------------------------------- /mobile/java/assets/sorting_of_values_in_array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/sorting_of_values_in_array.png -------------------------------------------------------------------------------- /mobile/java/assets/string_pool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/string_pool.png -------------------------------------------------------------------------------- /mobile/java/assets/string_pool_by_assignment_operator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/string_pool_by_assignment_operator.png -------------------------------------------------------------------------------- /mobile/java/assets/string_pool_by_means_of_assignment_operator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/string_pool_by_means_of_assignment_operator.png -------------------------------------------------------------------------------- /mobile/java/assets/with_synchronization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/with_synchronization.png -------------------------------------------------------------------------------- /mobile/java/assets/without_synchronization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/java/assets/without_synchronization.png -------------------------------------------------------------------------------- /mobile/java/coding/AnagramDetection.java: -------------------------------------------------------------------------------- 1 | import java.util.HashMap; 2 | import java.util.Map; 3 | 4 | 5 | public class AnagramDetection { 6 | 7 | private Map charToPrimeMap; 8 | 9 | public AnagramDetection() { 10 | charToPrimeMap = new HashMap(); 11 | populateCharToPrimeMap(); 12 | } 13 | 14 | private boolean isPrime(int n) { 15 | for (int i = 2; i < Math.ceil(Math.sqrt(n)); ++i) { 16 | if (n % i == 0) { 17 | return false; 18 | } 19 | } 20 | return true; 21 | } 22 | 23 | private int getNthPrime(int n) { 24 | int nthPrime = 2; 25 | while(n > 0) { 26 | if (isPrime(nthPrime)) { 27 | --n; 28 | } 29 | ++nthPrime; 30 | } 31 | return nthPrime; 32 | } 33 | 34 | private void populateCharToPrimeMap() { 35 | for (int i = 0; i < 52; i += 2) { 36 | charToPrimeMap.put((char)('a'+i/2), getNthPrime(i/2)); 37 | charToPrimeMap.put(Character.toUpperCase((char)('a'+i/2)), getNthPrime(i/2+1)); 38 | } 39 | } 40 | 41 | private int hashString(String input) { 42 | int hash = 1; 43 | for (char c: input.toCharArray()) { 44 | hash *= charToPrimeMap.get(c); 45 | } 46 | return hash; 47 | } 48 | 49 | public int detectAnagrams(String original, String anagram) { 50 | char[] originalChars = original.toCharArray(); 51 | int anagramCount = 0; 52 | for (int i = 0; i < original.length() - anagram.length(); ++i) { 53 | String currentSubstring = String.copyValueOf(originalChars, i, anagram.length()); 54 | if (hashString(currentSubstring) == hashString(anagram)) { 55 | ++anagramCount; 56 | } 57 | } 58 | return anagramCount; 59 | } 60 | 61 | public static void main(String[] args) { 62 | AnagramDetection a = new AnagramDetection(); 63 | System.out.println(a.detectAnagrams("AdnBndAndBdaBn", "dAn")); 64 | System.out.println(a.detectAnagrams("AbrAcadAbRa", "cAda")); 65 | } 66 | 67 | 68 | } 69 | -------------------------------------------------------------------------------- /mobile/java/coding/BalancedBrackets.java: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.HashMap; 3 | import java.util.Stack; 4 | 5 | 6 | public class BalancedBrackets { 7 | 8 | public boolean isBalanced(String s) { 9 | HashMap bracketMap = new HashMap(); 10 | bracketMap.put('{', '}'); 11 | bracketMap.put('[', ']'); 12 | bracketMap.put('(', ')'); 13 | Stack bracketStack = new Stack(); 14 | for (char c: s.toCharArray()) { 15 | if (!bracketStack.isEmpty() && bracketMap.get(bracketStack.peek()) == c) { 16 | bracketStack.pop(); 17 | } else if (bracketMap.containsKey(c)) { 18 | bracketStack.push(c); 19 | } else { 20 | return false; 21 | } 22 | } 23 | return bracketStack.isEmpty(); 24 | } 25 | 26 | public static void main(String[] args) { 27 | BalancedBrackets b = new BalancedBrackets(); 28 | System.out.println(b.isBalanced("()[]{}(([])){[()][]}")); 29 | System.out.println(b.isBalanced("())[]{}")); 30 | System.out.println(b.isBalanced("[(])")); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /mobile/java/coding/BinarySearchTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Program to create a binary search tree. 3 | * Author: Viveka Aggarwal 4 | */ 5 | 6 | public class BinarySearchTree { 7 | Node root; 8 | public class Node { 9 | Node left; 10 | Node right; 11 | Integer data; 12 | 13 | Node() { 14 | } 15 | 16 | Node(Integer data) { 17 | left = right = null; 18 | this.data = data; 19 | } 20 | } 21 | 22 | BinarySearchTree() { 23 | root = new Node(); 24 | } 25 | 26 | BinarySearchTree(Integer data) { 27 | root = new Node(data); 28 | } 29 | 30 | public void addToTree(Integer data) { 31 | addToTree(root, data); 32 | } 33 | 34 | private void addToTree(Node curr, Integer data) { 35 | if(curr == null) { 36 | curr = new Node(data); 37 | } else if(curr.data.compareTo(data) >= 0) { 38 | if(curr.left == null) 39 | curr.left = new Node(data); 40 | else 41 | addToTree(curr.left, data); 42 | } else { 43 | if(curr.right == null) 44 | curr.right = new Node(data); 45 | else 46 | addToTree(curr.right, data); 47 | } 48 | } 49 | 50 | @Override 51 | public String toString() { 52 | return toString(this.root); 53 | } 54 | 55 | String toString(Node curr) { 56 | if(curr == null) 57 | return ""; 58 | return toString(curr.left) + " " + curr.data + " " + toString(curr.right); 59 | } 60 | 61 | public static void main(String[] args) { 62 | BinarySearchTree tree = new BinarySearchTree(1); 63 | tree.addToTree(5); 64 | tree.addToTree(3); 65 | tree.addToTree(89); 66 | tree.addToTree(43); 67 | tree.addToTree(43); 68 | tree.addToTree(67); 69 | 70 | System.out.println(tree.toString()); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /mobile/java/coding/BubbleSort.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Bubble sort is a simple sorting algorithm that repeatedly steps through the list to be sorted, 3 | * compares each pair of adjacent items and swaps them if they are in the wrong order. 4 | * The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. 5 | * Author : Viveka Aggarwal 6 | * Author : Jayesh Chandrapal 7 | */ 8 | 9 | public class BubbleSort { 10 | public static void sort(int[] arr) { 11 | int len = arr.length; 12 | boolean unsorted = true; 13 | 14 | while(unsorted) { 15 | unsorted = false; 16 | 17 | for(int j = 0 ; j < len - 1; j++) { 18 | if(arr[j] > arr[j + 1]) { 19 | swap(j, j + 1, arr); 20 | unsorted = true; 21 | } 22 | } 23 | } 24 | } 25 | 26 | public static void swap(int a, int b, int[] arr) { 27 | int temp = arr[a]; 28 | arr[a] = arr[b]; 29 | arr[b] = temp; 30 | } 31 | 32 | public static void main(String[] a) { 33 | int[] arr = {23, 3, 12, 54, 34, 77, 78, 87, 92, 12}; // unsorted input 34 | //int[] arr = {3,12, 12, 23, 34, 54, 77, 78, 87, 92}; // sorted input 35 | 36 | sort(arr); 37 | 38 | for(int i : arr) { 39 | System.out.print(i + " "); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /mobile/java/coding/ConvertArray.java: -------------------------------------------------------------------------------- 1 | import java.util.Arrays; 2 | 3 | 4 | public class ConvertArray { 5 | 6 | public int getOriginalIndex(int currentIndex, int length) { 7 | return (currentIndex % 3) * length + currentIndex/3; 8 | } 9 | 10 | public int[] convert(int[] input) { 11 | // When array size is less than 3, returns an error. 12 | if (input.length % 3 != 0 ) { 13 | System.out.println("Error! Array cannot be divided into three equal parts"); 14 | return; 15 | } 16 | for (int i = 0; i < input.length; ++i) { 17 | int originalIndex = getOriginalIndex(i, input.length/3); 18 | while (originalIndex < i) { 19 | originalIndex = getOriginalIndex(originalIndex, input.length/3); 20 | } 21 | int temp = input[i]; 22 | input[i] = input[originalIndex]; 23 | input[originalIndex] = temp; 24 | } 25 | return input; 26 | } 27 | 28 | public static void main(String[] args) { 29 | ConvertArray c = new ConvertArray(); 30 | int[] test1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; 31 | System.out.println(Arrays.toString(c.convert(test1))); 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /mobile/java/coding/EvenOccuringElement.java: -------------------------------------------------------------------------------- 1 | import java.util.HashMap; 2 | import java.util.Iterator; 3 | import java.util.Map; 4 | import java.util.Map.Entry; 5 | 6 | public class EvenOccuringElement { 7 | public static void main(String[] args) { 8 | EvenOccuringElement eoe = new EvenOccuringElement(); 9 | int[] input = { 1, 2, 3, 3, 3, 4, 4, 4, 5, 6 }; 10 | Integer evenElement = eoe.getElement(input); 11 | if (evenElement != null) 12 | System.out.println(evenElement); 13 | } 14 | 15 | public Integer getElement(int[] input) { 16 | HashMap counter = new HashMap(); 17 | for (int i = 0; i < input.length; i++) { 18 | if (counter.containsKey(input[i])) 19 | counter.put(input[i], counter.get(input[i]) + 1); 20 | else 21 | counter.put(input[i], 1); 22 | } 23 | Iterator> it = counter.entrySet().iterator(); 24 | while (it.hasNext()) { 25 | Map.Entry pairs = (Entry) it 26 | .next(); 27 | if (((Integer) pairs.getValue() % 2) == 0) 28 | return (Integer) pairs.getKey(); 29 | } 30 | return null; 31 | } 32 | } -------------------------------------------------------------------------------- /mobile/java/coding/Fibonacci.java: -------------------------------------------------------------------------------- 1 | // program to print the fibonacci series 2 | import java.util.Scanner; 3 | 4 | public class Fibonacci { 5 | // computes and displays the value at nth position using dynamic programming 6 | static void printSeries(int n) { 7 | long first = 0,second = 1,third = 0; 8 | 9 | for (int i = 2 ; i < n ; i++) { 10 | third = first + second; 11 | first = second; 12 | second = third; 13 | } 14 | System.out.print("The number at position " +n+" of the fibonacci series is: " +third); 15 | } 16 | 17 | public static void main (String[] a) { 18 | Scanner in = new Scanner(System.in); 19 | System.out.print("Enter the position of the element to displayed in the fibonacci series: "); 20 | int n = in.nextInt(); 21 | System.out.println(); 22 | printSeries(n); 23 | in.close(); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /mobile/java/coding/FindingMissingElement.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class FindingMissingElement { 3 | 4 | /** 5 | *The difference in the sum of the two arrays will give us the desired value 6 | */ 7 | static int find_missing(int a[],int b[]) 8 | { 9 | int sum=0; 10 | for(int i:a) 11 | sum+=i; 12 | for(int i:b) 13 | sum-=i; 14 | return sum; 15 | } 16 | public static void main(String[] args) { 17 | int[] arr={1,3,5,6,2,5,6,8,9,23,45,67,87}; 18 | int[] shuffled_ar={1,2,5,6,8,9,3,45,87,6,67,5}; 19 | System.out.println("The missing value is:"+find_missing(arr,shuffled_ar)); 20 | 21 | 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /mobile/java/coding/IntegerDifference.java: -------------------------------------------------------------------------------- 1 | import java.util.HashMap; 2 | 3 | public class IntegerDifference { 4 | public static void main(String[] args) { 5 | IntegerDifference id = new IntegerDifference(); 6 | int[] input = { 1, 1, 3, 3 }; 7 | int diff = 2; 8 | System.out.print(id.getNumberOfElements(input, diff)); 9 | } 10 | 11 | public int getNumberOfElements(int[] input, int diff) { 12 | int numberOfElements = 0; 13 | HashMap sums = new HashMap(); 14 | for (int i = 0; i < input.length; i++) { 15 | int sum = diff + input[i]; 16 | if (sums.containsKey(sum)) 17 | sums.put(sum, sums.get(sum) + 1); 18 | else 19 | sums.put(sum, 1); 20 | } 21 | for (int i = 0; i < input.length; i++) { 22 | if (sums.containsKey(input[i])) { 23 | numberOfElements += sums.get(input[i]); 24 | } 25 | } 26 | return numberOfElements; 27 | } 28 | } -------------------------------------------------------------------------------- /mobile/java/coding/LargestContinuousSum.java: -------------------------------------------------------------------------------- 1 | public class LargestContinuousSum { 2 | public static void main(String[] args) { 3 | LargestContinuousSum lcd = new LargestContinuousSum(); 4 | int[] input = { 1, -1, 2, -5, 10, 15, -10, 5 }; 5 | System.out.print(lcd.getSum(input)); 6 | } 7 | 8 | public int getSum(int[] input) { 9 | int currentMax = input[0]; 10 | int finalMax = input[0]; 11 | for (int i = 1; i < input.length; i++) { 12 | if (currentMax + input[i] > input[i]) 13 | currentMax = currentMax + input[i]; 14 | else 15 | currentMax = input[i]; 16 | 17 | if (currentMax > finalMax) 18 | finalMax = currentMax; 19 | 20 | } 21 | return finalMax; 22 | } 23 | } -------------------------------------------------------------------------------- /mobile/java/coding/LargestPalindrome.java: -------------------------------------------------------------------------------- 1 | public class LargestPalindrome { 2 | public static void main(String[] args) { 3 | LargestPalindrome lp = new LargestPalindrome(); 4 | String input = "I am a red racecar driver"; 5 | System.out.println(lp.getPalindrome(input)); 6 | } 7 | 8 | public String getPalindrome(String input) { 9 | if (input == null || input.length() == 0) 10 | return ""; 11 | if (input.length() == 1) 12 | return input; 13 | 14 | String largestPalindrome = input.charAt(0) + ""; 15 | // Run across the string 16 | for (int i = 1; i < input.length(); i++) { 17 | String curPalindrome = checkSides(input, i, i); 18 | if (curPalindrome.length() > largestPalindrome.length()) 19 | largestPalindrome = curPalindrome; 20 | } 21 | return largestPalindrome; 22 | } 23 | 24 | public String checkSides(String input, int left, int right) { 25 | while (left >= 0 && right < input.length() 26 | && input.charAt(left) == input.charAt(right)) { 27 | left--; 28 | right++; 29 | } 30 | return input.substring(left + 1, right); 31 | } 32 | } -------------------------------------------------------------------------------- /mobile/java/coding/LongestCommonPrefix.java: -------------------------------------------------------------------------------- 1 | public class LongestCommonPrefix { 2 | public static void main(String[] args) { 3 | LongestCommonPrefix lcs = new LongestCommonPrefix(); 4 | String[] input = { "rocket", "rockstar", "rockbottom", "rollingstone"}; 5 | System.out.println(lcs.getSubstring(input)); 6 | } 7 | 8 | public String getSubstring(String[] input) { 9 | String base = input[0]; 10 | for (int i = 0; i < base.length(); i++) { 11 | for (int j = 1; j < input.length; j++) { // Run for all words 12 | String comparer = input[j]; 13 | if (i >= comparer.length() 14 | || comparer.charAt(i) != base.charAt(i)) 15 | return base.substring(0, i); 16 | } 17 | } 18 | return ""; 19 | } 20 | } -------------------------------------------------------------------------------- /mobile/java/coding/NextHighestNumber.java: -------------------------------------------------------------------------------- 1 | public class NextHighestNumber { 2 | /*** 3 | * Convert int into character array. Starting from the end, compare each 4 | * number with all numbers before it, one at a time. At any moment we find a 5 | * number greater than any of its previous numbers, we swap them, and return 6 | * the converted int. 7 | */ 8 | public static void main(String[] args) { 9 | // TODO Auto-generated method stub 10 | NextHighestNumber nhn = new NextHighestNumber(); 11 | Integer next = nhn.getNextHighestNumber(32233); 12 | if (next != null) 13 | System.out.println(next); 14 | } 15 | 16 | public Integer getNextHighestNumber(int n) { 17 | String sNumber = String.valueOf(n); 18 | char[] nums = sNumber.toCharArray(); 19 | for (int i = nums.length - 1; i > 0; i--) { 20 | for (int j = i - 1; j >= 0; j--) 21 | if (Integer.valueOf(nums[i]) > Integer.valueOf(nums[j])) { 22 | char t = nums[i]; 23 | nums[i] = nums[j]; 24 | nums[j] = t; 25 | return Integer.valueOf(new String(nums)); 26 | } 27 | } 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /mobile/java/coding/RemoveDuplicatesFromString.java: -------------------------------------------------------------------------------- 1 | // Program to remove duplicates from a given string 2 | // 1. getUniqueString(String) method uses a boolean array. 3 | // 2. removeDuplicates(String) method uses a hash map. 4 | // Both the methods have O(n) space and time complexity. (n being the string length) 5 | 6 | import java.util.HashMap; 7 | 8 | public class RemoveDuplicatesFromString { 9 | public static void main(String[] args) { 10 | RemoveDuplicatesFromString rsd = new RemoveDuplicatesFromString(); 11 | String input = "Tree Traversal"; 12 | System.out.println("Method 1: " +rsd.getUniqueString(input)); 13 | System.out.println("Method 2: " +rsd.removeDuplicates(input)); 14 | } 15 | 16 | public String getUniqueString(String input) { 17 | boolean[] isUsed = new boolean[256]; 18 | StringBuffer sb = new StringBuffer(); 19 | for (int i = 0; i < input.length(); i++) { 20 | int position = input.charAt(i); 21 | if (!isUsed[position]) { 22 | sb.append(input.charAt(i)); 23 | isUsed[position] = true; 24 | } 25 | } 26 | return sb.toString(); 27 | } 28 | 29 | public String removeDuplicates(String input) { 30 | HashMap map = new HashMap<>(); 31 | StringBuffer sb = new StringBuffer(""); 32 | for (int i = 0; i < input.length(); i++) { 33 | char c = input.charAt(i); 34 | if (!map.containsKey(c)) { 35 | sb.append(c); 36 | map.put(c, 1); 37 | } 38 | } 39 | return sb.toString(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /mobile/java/coding/ReverseWordsInAString.java: -------------------------------------------------------------------------------- 1 | public class ReverseWordsInAString { 2 | public static void main(String[] args) { 3 | String input = "Interviews are awesome!"; 4 | System.out.println("In: " + input); 5 | 6 | String output = reverseWords(input); 7 | System.out.println("Out: " + output); 8 | } 9 | 10 | private static String reverseWords(String input) { 11 | String[] split = input.split("\\s"); 12 | String output = ""; 13 | for (int i = split.length - 1; i >= 0; i--) { 14 | output += split[i]; 15 | output += " "; 16 | } 17 | return output; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /mobile/java/coding/SearchUnknownLengthArray.java: -------------------------------------------------------------------------------- 1 | public class SearchUnknownLengthArray { 2 | public static void main(String[] args) { 3 | SearchUnknownLengthArray sla = new SearchUnknownLengthArray(); 4 | int[] input = { 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 5, 6, 7, 8, 9, 5 | 9, 9, 9}; 6 | int search = 4; 7 | System.out.println(sla.findElement(input, search)); 8 | } 9 | 10 | /** 11 | * Algorithm: ardendertat.com 12 | * http://www.ardendertat.com/2011/11/21/programming-interview-questions-17-search-unknown-length-array/ 13 | */ 14 | 15 | public int findElement(int[] input, int search) { 16 | int index = 1; 17 | try { 18 | if (input[0] == search) { 19 | return 0; 20 | } 21 | while (index < Integer.MAX_VALUE) { 22 | if (input[index] == search) 23 | return index; 24 | else if (input[index] > search) { 25 | return findBetween(input, search, index); 26 | } 27 | index = (int) Math.pow(2, index); 28 | } 29 | } catch (Exception e) { 30 | return -1; 31 | } 32 | return -1; 33 | } 34 | 35 | public int findBetween(int[] input, int search, int index) { 36 | if (input[index] < search) 37 | return -1; 38 | if (input[index] == search) 39 | return index; 40 | return findBetween(input, search, index - 1); 41 | } 42 | } -------------------------------------------------------------------------------- /mobile/java/coding/StringRotation.java: -------------------------------------------------------------------------------- 1 | public class StringRotation { 2 | 3 | public static void main(String[] args) { 4 | // TODO Auto-generated method stub 5 | StringRotation sr = new StringRotation(); 6 | System.out.println(sr.isRotation("ABCD", "BCDA")); 7 | } 8 | 9 | public boolean isRotation(String one, String two) { 10 | /** 11 | * This code checks if one is a rotation of two The way it works is - 12 | * concatenate the original string with itself, and check if the rotated 13 | * string is contained in it. For example : ABCD is contained in BCDABCDA 14 | */ 15 | return (two + two).contains(one); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /mobile/react-native/assets/IOS_Platform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/IOS_Platform.png -------------------------------------------------------------------------------- /mobile/react-native/assets/Image-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/Image-11.png -------------------------------------------------------------------------------- /mobile/react-native/assets/Image-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/Image-12.png -------------------------------------------------------------------------------- /mobile/react-native/assets/Image-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/Image-2.png -------------------------------------------------------------------------------- /mobile/react-native/assets/Props_Drilling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/Props_Drilling.png -------------------------------------------------------------------------------- /mobile/react-native/assets/SSL_Pinning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/SSL_Pinning.png -------------------------------------------------------------------------------- /mobile/react-native/assets/android_platform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/android_platform.png -------------------------------------------------------------------------------- /mobile/react-native/assets/bridge_in_react_native.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/bridge_in_react_native.png -------------------------------------------------------------------------------- /mobile/react-native/assets/developer-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/developer-menu.png -------------------------------------------------------------------------------- /mobile/react-native/assets/react-native-redux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/react-native-redux.png -------------------------------------------------------------------------------- /mobile/react-native/assets/react-native.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/react-native.jpg -------------------------------------------------------------------------------- /mobile/react-native/assets/reactjs_vs_react_native.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ren0503/fullstack-interviews/502c62e9ec23c151d845c1162988691595c51562/mobile/react-native/assets/reactjs_vs_react_native.png --------------------------------------------------------------------------------